You are on page 1of 3

1) Write a java Program to check whether given String is Palindrome or not.

2) Write a Java program which accepts three integer values and prints the maximum and minimum.
3) Write a Java program to display Fibonacci series.
4) Write a Java program to accept a year and check if it is leap year or not.
5) Write a Java program to accept two numbers using command line argument and calculate addition, subtraction,
multiplication and division.
6) Write a java program to calculate the sum of even numbers from an array.
7) Write a java Program to accept employee name from a user and display it in reverse order.
8) Write a java program to display the vowels from a given string.
9) Write a java program to accept n city names and display them in ascending order.
10) Write a java program to search given name into the array, if it is found then display its index otherwise display
appropriate message.
11) Write a java program to count the frequency of each character in a given string.
12) Write a Java program to display Fibonacci series using function.
13) Define class Student(rno, name, mark1, mark2). Define Result class(total, percentage) inside the student class. Accept the
student details & display the mark sheet with rno, name, mark1, mark2, total, percentage. (Use inner class concept)
14) Write a java program to accept details of ‘n’ cricket players(pid, pname, totalRuns, InningsPlayed, NotOuttimes).
Calculate the average of all the players. Display the details of player having maximum average.
15) Write a java program to calculate area of Cylinder and Circle.(Use super keyword)
16) Define an Interface Shape with abstract method area(). Write a java program to calculate an area of
Circle and Sphere.(use final keyword)
17) Define an Interface “Integer” with a abstract method check().Write a Java program to check whether
a given number is Positive or Negative.
18) Create an abstract class Shape with methods calc_area() & calc_volume(). Derive two classes
Sphere(radius)& Cone(radius, height) from it. Calculate area and volume of both. (Use Method
Overriding)
19) Construct a Linked List containg name: CPP, Java, Python and PHP. Then extend your program to do
the following:
i) Display the contents of the List using an iterator
ii) Display the contents of the List in reverse order using a ListIterator.
20) Create a hashtable containing employee name & salary. Display the details of the hashtable. Also
search for a specific Employee and display salary of that employee.
21) Create a hashtable containing city name & STD code. Display the details of the hashtable. Also
search for a specific city and display STD code of that city.

22) Write a java program to check whether given candidate is eligible for voting or not. Handle user
defined as well as system defined Exception.
23) Write a java program to accept a number from user, If it is greater than 100 then throw user defined
exception “Number is out of Range” otherwise do the addition of digits of that number. (Use static
keyword)
24) Write a java program to accept a number from a user, if it less than 5 then throw user defined
Exception “Number is small”, if it is greater than 10 then throw user defined exception “Number is
Greater”, otherwise calculate its factorial.
25) Write a java program to display contents of a file in reverse order.
26) Write a java program to display each word from a file in reverse order.
27) Write a java program to accept list of file names through command line. Delete the files having
extension .txt. Display name, location and size of remaining files.
28) Create an Applet that displays the x and y position of the cursor movement using Mouse and
Keyboard. (Use appropriate listener).
29) Create the following GUI screen using appropriate layout managers.
30) Write a java program to implement a simple arithmetic calculator. Perform appropriate validations.

You might also like