OOPs Interview Questions for Fresher and Experienced


1) What are the main building blocks of oops?
2) What do you mean by inheritance?
3) How to achieve inheritance concept and inheritance is also known as?
4) How many types of inheritance in java and how many types of inheritance not supported by java?
5) How to prevent inheritance concept?
6) What is the purpose of extends keyword?
7) What do you mean by cyclic inheritance java supporting or not?
8) What is the difference between child class and parent class?
9) What is the root class for all java classes?
10) Inside the constructor if we are not providing this() and super() keyword the compiler generated which type of super keyword?
11) How to call super class constructors?
12) Is it possible to use both super and this keyword inside the method?
13) Is it possible to use both super and this keyword inside the constructor?
14) If the child class and parent class contains same variable name that situation how to call parent class variable in child class?
15) One class able to extends how many classes at a time?
16) If we are extending the your class will become parent class if we are not extending what is the parent class?
17) What do you mean by aggregation and what is the difference between aggregation and inheritance?
18) What do you mean by aggregation and composition and Association?
19) Aggregation is also known as?
20) How many objects are created ?
a. MyClassHero c1,c2; C1 = New MyClassHero();
21) What is the root class for all java classes?
22) Which approach is recommended to create object either parent class object or child class object?
23) Except one class all class contains parent class in java what is that except class?
24) What is the purpose of instance of keyword in java?
25) What do you mean by polymorphism?
26) What do you mean by method overloading and method overriding?
27) How many types of overloading in java?
28) Is it possible to override variable in java?
29) What do you mean by constructor overloading?
30) What are rules must fallow while performing method overriding?
31) When we will get compilation error like “overridden method is final”?
32) What is the purpose of final modifier java?
33) Is it possible to override static methods yes-how no-why?
34) Parent class reference variable is able to hold child class object?
35) How many types of polymorphism in java?
36) What do you mean by dynamic method dispatch?
37) The applicable modifiers for local variables?
38) Is it all methods present in final class is always final and is it all variables present final class is always final?
39) If Parent class is holding child class object then by using that we are able to call only overridden methods of child class but how to call direct methods of child class?
40) Object class contains how many methods?
41) When we will get compilation error like “con not inherit from final parent”?
42) How many types of type casting in java?
43) What do you mean by co-variant return types?
44) What do u mean by method hiding?
45) What do you mean by abstraction?
46) How many types of classes in java?
47) Normal class is also known as ?
48) What is the difference between normal method and abstract method?
49) What is the difference between normal class and abstract class?
50) Is it possible to create a object for abstract class?
51) What do you mean by abstract variable?
52) Is it possible to override non-abstract method as a abstract method?
53) Is it possible to declare main method inside the abstract class or not?
54) What is the purpose of abstract modifier in java?
55) How to prevent object creation in java?
56) What is the definition of abstract class?
57) In java is it abstract class reference variable is able to hold child class object?
58) What do you mean by encapsulation?
59) What do you mean by tightly encapsulated class?
60) What do you mean accessor method and mutatormethod ?
61) How many ways area there to set some values to class properties?
62) Can we overload method?
63) Can we inherit main method in child class?
64) In java main method is called by ?
65) The applicable modifiers on main method?
66) While declaring main method public static modifiers order mandatory or optional?
67) What is the argument of main method?
68) What is the return type of main method?
69) What are the mandatory modifiers for main method and optional modifiers of main method?
70) Why main method is static?
71) What do you by command line arguments?
72) Is it possible to pass command line arguments with space symbol no good yeshow ?
73) What is the purpose of strictfp classes?
74) What is the purpose of strictfp modifier?
75) What is the purpose of native modifier?
76) What do you mean by native method and it also known as?
77) What do you mean by javaBean class?
78) The javabean class is also known as?
79) Applicable modifiers on local variables?
80) What is the execution process of constructors if two classes are there in inheritance relationship?
81) What is the execution process of instance blocks if two classes are there in inheritance relationship?
82) What is the execution process of static blocks if two classes are there in inheritance relationship?
83) What is the purpose of instanceof operator in java & what is the return-type?
84) If we are using instanceof both reference-variable & class-name must have some relationship otherwise compiler generated error message is what?

Comments

Popular posts from this blog

Exception Handling

Wrapper Class

Collections Framework Interview Questions for Fresher and Experienced