Sec 2: OOP Concepts
13) What is difference between object oriented programming language and object based programming language?
14) What will be the initial value of an object reference which is defined as an instance variable?
15) What is constructor?
16) What is the purpose of default constructor?
17) Does constructor return any value?
18) Is constructor inherited?
19) Can you make a constructor final?
20) What is static variable?

21) What is static method?
22) Why main method is static?

24) Can we execute a program without main() method?
25) What if the static modifier is removed from the signature of the main method?
26) What is difference between static (class) method and instance method?

27) What is this in java?


28)What is Inheritance?

29) Which class is the superclass for every class.
30) Why multiple inheritance is not supported in java?
31) What is composition?
32) What is difference between aggregation and composition?
33) Why Java does not support pointers?
34) What is super in java?


35) Can you use this() and super() both in a constructor?
36)What is object cloning?
37) What is method overloading?

38) Why method overloading is not possible by changing the return type in java?
39) Can we overload main() method?
40) What is method overriding?

41) Can we override static method?
42) Why we cannot override static method?
43) Can we override the overloaded method?
44) Difference between method Overloading and Overriding.

举例说明 overriding Vs. overloading
45) Can you have virtual functions in Java?
46) What is covariant return type?
47) What is final variable?

48) What is final method?
49) What is final class?

50) What is blank final variable?
51) Can we intialize blank final variable?
52) Can you declare the main method as final?
53) What is Runtime Polymorphism?
54) Can you achieve Runtime Polymorphism by data members?
举例说明多态
55) What is the difference between static binding and dynamic binding?
56) What is abstraction?
57) What is the difference between abstraction and encapsulation?
58) What is abstract class?
59) Can there be any abstract method without abstract class?
60) Can you use abstract and final both with a method?
61) Is it possible to instantiate the abstract class?
62) What is interface?

63) Can you declare an interface method static?
64) Can an Interface be final?
65) What is marker interface?
66) What is difference between abstract class and interface?

67) Can we define private and protected modifiers for variables in interfaces?
68) When can an object reference be cast to an interface reference?
69) What is package?
70) Do I need to import java.lang package any time? Why ?
71) Can I import same package/class twice? Will the JVM load the package twice at runtime?
72) What is static import ?
Last updated





