Oopj Question Bank
Oopj Question Bank
USING JAVA
QUESTION BANK
(Dr. Kalyan Kumar Jena)
1. Write a program to display “hello world”.
2. Write a program that shows the use of bit wise operators.
3. Write a program that shows the use of arithmetic operators.
4. Write a program that shows the use of increment and decrement operators.
5. Write a program to display the area of circle using (i)command line argument, (ii)Scanner class (iii)
BufferedReader class
6. Write a program to display the addition result of any two integers.
7. Write a program for the swapping of two numbers.
8. Write a program to print all the prime numbers between 1 to 100.
9. Write a program to print all the palindrome number between 100 to 500.
10. Write a program to display the student name, roll no and age of a student using class and object
concept.
11. Write separate programs that shows the implementation of
(i)static variable and static member function
(ii)static block concept
12. Write a program that shows the use of default, parameterized and copy constructor.
13. Write separate programs for method overloading and method overriding mechanism.
14. Write a program for single inheritance mechanism.
15. Write a program where abstract class concept is used.
16. Write a program to pass the arguments from child class constructor to parent class constructor using
super ( ).
17. Write a program to display name, department and age of employee using interface mechanism
18. Write a program for the implementation of user defined package.
19. Write a program for the manipulation of string using different functions of String class.
20. Write a program for the execution of multiple threads with their priority.
21. Write a program for the execution of multiple threads.
22. Write a complete program for the execution of applet mechanism.
23. Write a program for drawing several GUI components on applet.
24. Write a program for the implementation of several methods of Graphics class.
25. Write a program for handling multiple exceptions.
26. Write a complete program for Java Database Connectivity.
27. Write a program to enter two numbers(say a and b) and an option. If the option is:
1:display the result (a+b)
2: display the result (a-b)
3: display the result (a*b)
4: display the result (a/b)
5: display the result (a%b)
28. Write a program to display emp. no=101 and emp. name=”Martin” using class and object concept.
29. Write a program to display the area of triangle, rectangle and circle using constructors.
30. Write a program to print all the armstrong numbers between 200 to 400.
31. Write a program to check whether a number is prime or not.
32. Write a program to check whether a number is armstrong or not.
33. Write a program to check whether a number is pallindrome or not.
34. Develop a menu based program for the addition, subtraction, multiplication and division of two
complex numbers.
35. Write a program for the addition, subtraction, multiplication and division of two numbers using
constructor.
36. Write a program for addition of two 3x3 matrix.
37. Write a program for multiplication of two 3x3 matrix.
38. Write a program to display the transpose of a 3x3 matrix.
39. Write a program to display the sum of digits of a number.
40. Write a program to display the reverse of a number.
41. Write a program to enter n numbers to an array and display the greatest and smallest number.
42. Write a program that shows the use of multilevel inheritance mechanism.
43. Write a program that shows the use of multiple inheritance mechanism using interface.
44. Write a program to display car no., model, color and price of a car using class and object concept.(use
Scanner class)
45. Write a program to display the area of circle, triangle and rectangle using user defined package
46. Write a program to display the name, pages, price and author of a book using interface mechanism.
47. Write a program to display the average of five integers.
48. Write a program to display simple interest.
49. Write a program to display the factorial of a number.
50. Write a program to display the fibonacci series upto n terms.
51. Write a program to enter two numbers and display the GCD and LCM.
52. Write a program to convert decimal number to binary number.
53. Write separate programs for different pyramid structures.
54. Write a program for the implementation of swing components.
55. Write a java socket programming in which client sends a text and server receives it.
56. What are the OOP Principles?
57. What is Encapsulation?
58. What is Polymorphism?
59. What is Inheritance?
60. What are the features of Java Language?