Subject Name: Object Oriented programming
Theoretical
Ch.1
1. What is byte code? What does the JVM do? Why Java is called portable
language
Ch.2
2. Explain the three principals of OOP.
Ch.3
3. Why Java is called Strongly typed language?
4. What is widening, narrowing conversion and truncation? Explain with
example.
5. Explain Type promotion rule in Java with example.
6. How array is created in Java?
7.
How we create bellow mention array in Java.
Ch. 5
8. What are the benefits of for each loop? Explain with example code.
9. What are wrapper classes? Why do we need wrapper classes?
Ch. 6
10. What is class and object in Java? What is the difference between class
and object?
11. What new operator does?
12. What is constructor and default constructor in Java? What is the utility
of constructor in Java?
13. What is “this” keyword in Java? What is the utility of “this” keyword
Java?
14. What do you mean by garbage collection in Java?
15. What is finalize method? What is the purpose of finalize method?
Ch. 7
16. What is method overloading in Java? Explain benefit of it.
17. What is constructor overloading in Java? Explain benefit of it.
18. What is access specifier in Java? How many access specifier are there in
Java?
19. How we implement the concept of encapsulation in Java? Explain with
example.
20. Explain the concept of “static “keyword with example.
21. Why main method is preceded by “public static void main”?
22. Explain the properties of static method and static variable.
23. What is the difference between length () and length in Java?
24. What is nested class? Explain with example.
25. What is inner class? Explain with example.
26. What is command line argument? Explain with example.
27. What is varargs method in Java? Explain with example.
Ch. 8
28. How we implement the concept of inheritance in Java.
29. What is the utility of “super”? Explain with example.
30. What are the types of inheritance Java supports?
31. What is method overriding. Explain the benefit of it.
32. What is dynamic method dispatch in Java?
33. What is early binding and late binding
34. What is abstract class in Java? Explain the benefit of it.
35. What is the effect of “final” keyword in terms of method, class and
variable?
36. Develop a program in java to compute the percentage of a student and
print the details of the student with its secured percentage by using
inheritance. Here, we have two classes, in which the class
studentDetails contains the basic information (like, name, roll,
year_of_admission, date_of_birth, semester etc.) about a student and
another class Marks contains the marks of different subjects.
Ch. 9
37. What is package? Explain the benefit of it.
38. What is interface? Explain the benefit of it.
39. What is the difference between abstract class and interface?
40. How we implement multiple inheritances in Java? Explain with
example.
41. Develop a program in JAVA to create an interface Area in package P1
that consists of a method computeArea(). Implement the computeArea()
method in Rectangle class and Circle class to compute the area of
respective classes in package P2 without importing package P1.
42. Create a package “LinearSearch” having a method “search()”. Then use
this package to search whether a number belongs to an array or not.
Ch. 10
43. What is exception in Java? How we handle exception in Java? If
exception not handle then what will happen in your program?
44. Explain multiple catch with example.
45. What is the difference between “throw” and “throws” keyword?
46. What is the utility of “finally” keyword? Explain with example.
47. What is the difference between final, finally, finalized?
48. What is the difference between checked and unchecked Exception?
Explain with example.
Ch. 11
49. Explain the life cycle of Thread.
50. What is the difference between sleep method and resume method?
51. Discuss the benefit of isAlive() and join() with example.
52. What is thread synchronization? Why it is needed, explain with
example.
53. What is synchronized statement?
54. What is interthread communication? What are the methods needed to
implement interthread communication?
55. What is deadlock in thread? How deadlock situation arise in thread,
explain with example.
56. Explain the difference between creating a thread by Extending the
Thread class and creating a thread by implementing the Runnable
interface with suitable programs?
57. Develop a program in JAVA that will create two threads t1 and t2. t1
thread will compute the odd numbers between the range 10 - 50 and t2
thread will print the prime numbers between the range 10 - 50.
Ch. 21
58. What are the difference between java application program and applet?
Explain the life cycle of Applet.