Java Programming Practical Exam Questions
1. Write a program to check no is even or odd.
2. Write a program to check switch-case using character datatype.
3. Write a program to show the use of all methods of String class.
4. Write a program to implement all methods of StringBuffer class.
5. Write a program to insert different elements in the Vector & display them.
6. Demonstrate use of at least two types of constructors.
7. Write a program to implement single inheritance.
8. Write a program to implement multilevel inheritance.
9. Develop a program to calculate he room area and volume to illustrate the concept of
single inheritance.
10. Develop a program to find area of rectangle and circle using interfaces.
11. Write a program to implement user defined packages in terms of creating a new
package and importing the same.
12. Define a package named myInstitute include class named as department with one
method to display the staff of that department. Develop a program to import this
package in a java application and call the method defined in the package.
13. Develop a program which consists of the package named let_me_calculate with a
class named Calculator and a method named add to add two integer numbers.
Import let_me_calculate package in another program (class named Demo) to add
two numbers.
14. Create three threads and run these threads according to setPriority.
15. Develop a program to accept a password from the user and throw “Authentication
Failure” Exception if the password is incorrect.
16. Define an exception called “NotMatchExceptons” that is thrown when a string is not
equals to “India”. Write a program that uses this exceptions.
17. Write a program to create three Buttons with Caption OK RESET and CANCEL
18. Develop an applet/application using List components to add names of 10 different
cities.
19. Develop a program to select multiple languages known to user. (e. g Marathi, Hindi,
20. English, Sanskrit).
21. Develop applet / application to select multiple names of news papers
22. Design an applet/application to demonstrate the use of Radio Button and Checkbox.
23. Write a program which creates Menu of different colors and disable menu item for
Black color.
24. Write a program to generate following output using Border Layout
25. Write a program to display The Number on Button from 0 to 9 using Grid Layout.
26. Write a program code to generate the following output
27. Develop a program to demonstrate the use of JTree component in swing.
28. Write a Java program to create a table of Name of Student, Percentage and Grade
of 10 students using JTable.
29. Write a program to generate KeyEvent when a key is pressed and display “Key
Pressed” message
30. Write a program to demonstrate the use of mouseDragged and mouseMoved
method of MouseMotionListener
31. Write a program to change the background colour of Applet when user performs
32. events using Mouse.
33. Write Java Program to display following output.
34. Write a program using JTextField to perform the addition of two numbers.
35. Develop a program to accept two numbers and display product of two numbers
when user pressed “Multiply” button.
36. Develop a program using InetAddress class to retrieve IP address of computer When
37. hostname is entered by the user.
38. Write a program using URL class to retrieve the host, protocol, port and file of URL
([Link]
39. Write a Program to create a Student Table in database and insert a record in a
Student table.
40. Develop a program to create employee table in database having two columns
“emp_id” and “emp_name”.