Skip to main content

Decision Making, Looping, String, Array, Wrapper Classes in JAVA Examples

  1.Print even number up to 10 using while loop.
  2.Check whether the given number is even or odd.
  3.Calculator using switch statement.
  4.Create an array to store 5 integer values and display the array Elements in reverse order.
  5.Print Prime Numbers contained by the Array in JAVA.
  6.Store Six Random characters in Array & copy 2 to 4 index values to another Array with same index.
  7.Sort a Integer Array.
  8.A String Display each character on separate line in Reverse order in JAVA.(accepts a string from users and display each character on separate line in reverse order in JAVA)
  9.Sort a String Array in JAVA.(Create a string array and sort all the string contained by the array in JAVA)
10.Palindrome String in JAVA.(check whether the string is a palindrome or not in JAVA.)
11.Manipulating Character in JAVA.(UpperCase | isLowercase | toUppercase | toLowerCase | isLetterOrDigit | isWhitespace in JAVA)
12.Array Class in JAVA | Using Array Class in JAVA.(Arrays.fill | Arrays.sort | Arrays.equals | Arrays.binarySearch in JAVA)
13.equals() method & equalsIgnoreCase() method in JAVA.
14.Compare() method in JAVA.(Different return value compare two different string in JAVA)
15.length method vs length() method in Java.(Different Type to use length & length() in String & Array in JAVA)
16.indexOf() method in JAVA.(Four different ways to use indexOf() in JAVA)
17.CharAt() method & setCharAt() method in JAVA.
18.endsWith() method & startsWith() method in java.
19.replace() method in Java.(three types of use replace() method in JAVA.replace(),replaceFirst(),replacrAll())
20.toString() method in JAVA.(Different ways to use toString() method in JAVA)
21.substring() method in JAVA.
22.Swipe Number without third variable and without arithmetic operator in JAVA.
23.Find Second highest Number in JAVA.(Number is declare before in program.)
24.Find Second highest Number in JAVA.(n number take from user)
25.Ontime Sort in JAVA.(My logic)
26.Sorting Three Number in JAVA.(without inbuilt function).
27.Sorting Four Number in JAVA.(without inbuilt function).
28.Simple Logic of Prime Number in JAVA.
29.Simple Logic of Reverse Number in JAVA.
30.Calculator in JAVA and all arithmetic function and Math Sqrt,Math pow,Math log functions in JAVA.
31.Bank Application in JAVA.
32.Find GCD in JAVA.

Comments

Popular posts from this blog

BCA SEM 5 SHELL SCRIPT PROGRAM

1  Write a shell script to execute following commands 1. Sort file abc.txt and save this sorted file in xyz.txt 2. Give an example of : To execute commands together without affecting result of each other. 3. How to print “this is a three –line 1. Text message” 4. Which command display version of the UNIX? 5. How would u get online help of cat command? echo “sorting the file” sort abc.txt > xyz.txt echo “executing two commands” who ; ls echo “this is \n a three-line \n Text message” # use -e option if required echo “The version is `uname -a`” echo “Help of cat command” man cat 2  Write a shell script to execute following commands 1. How would u display the hidden files? 2. How delete directory with files? 3. How would user can do interactive copying? 4. How would user can do interactive deletion of files? 5. Explain two functionality of “mv” command with example? echo “1. How would u display the hidden files” echo “2. How delete directory with files” echo “3. How

C++

I NTRODUCTION TO OOP,CLASSES & OBJECTS 1. Use of scope Resolution of Operators. 2. Define a function outside a using scope resolution operators. 3. Write a program to calculate the area of circle, rectangle and square using function overloading. 4. Write a program to calculate the area of circle, rectangle and square using with class & object. 5. Write a program to demonstrate the use of returning a reference variable. 6. Create a class student,stores the details about name,roll no,marks of 5 subject,1.get function accept value of data members,2. display function to display,3.total function to return total of 5 subjects marks. 7. Create function power() in c++. & Create function power() in c++ and default argument. 8. Write a C++ program to swap the value of private data members from 2 different classes. 9. Write a program to illustrate the use of this pointer. 10. An election is contested by five candidates. The candidates are numbered 1 to 5 and the voting is do

USER- DEFINED FUNCTIONS

1. Write a program to calculate average temperature of five days.Create temp() function . 2. Write a program that uses recursive function fibo() thatgenerates a Fibonacci series containing N elements. 3. Write a program that uses a recursive function fact() that findsthe factorial of a given number N. 4. Program to find if the given no. is prime or not. The functionshould accept the number as argument and return if the no. isprime or not. 5. Write a function that accepts an array of integer values. Thefunction should find the number which divides all the othernumbers. 6. Write a user-defined function to perform Square of a number 7. Write a user-defined function to perform Area of a number 8. Write a user-defined function to perform Reverse the number 9. Write a program that uses a function to check whether anentered three digit number is palindrome or not. 10. Write a program to calculate the result of following with recursive calls offunction. 11. Simple interset with usin