Raghu Sir Java Question
Raghu Sir Java Question
OOPS:-
24 Explain about object oriented programming and its features?
25 What is Abstraction?
26 What is Encapsulation?
27 What is the difference between abstraction and encapsulation?
28 List out benefits of object oriented programming language?
29 Differences between traditional programming language and object oriented
programming language?
30 What is Inheritance?
31 What is Polymorphism?
32 How does Java implement polymorphism?
33 Explain the different forms of Polymorphism
34 What is runtime polymorphism or dynamic method dispatch?
35 What is Dynamic Binding?
36 What is method overloading?
37 What is method overriding?
38 What are the differences between method overloading and method overriding?
39 Can overloaded methods be override too?
40 Is it possible to override the main method?
41 How to invoke a superclass version of an Overridden method?
42 What is super?
43 How do you prevent a method from being overridden?
44 What is an Interface?
45 Can we instantiate an interface?
46 Can we create an object for an interface?
47 Do interfaces have member variables?
48 What modifiers are allowed for methods in an Interface?
49 What is a marker interface?
50 What is an abstract class?
51 Can we instantiate an abstract class?
52 What are the differences between Interface and Abstract class?
53 When should I use abstract classes and when should I use interfaces?
54 When you declare a method as abstract, can other non abstract methods access it?
55 Can there be an abstract class with no abstract methods in it?
56 What is IS-A relationship in java?
57 What is HAS A relationship in java?
58 Difference between IS-A and HAS-A relationship in java?
59 Explain about instanceof operator in java?
60 What does null mean in java?
61 Can we have multiple classes in single file ?
62 What all access modifiers are allowed for top class ?
63 What are packages in java?
64 Can we have more than one package statement in source file ?
65 Can we define package statement after import statement in java?
66 What are identifiers in java?
67 What are access modifiers in java?
68 What is the difference between access specifiers and access modifiers in?
69 What access modifiers can be used for class ?
70 Explain what access modifiers can be used for methods?
71 Explain what access modifiers can be used for variables?
72 What is final access modifier in java?
73 Explain about abstract classes in java?
74 Can we create constructor in abstract class ?
75 What are abstract methods in java?
Type Casting
76 What is TypeConversion?
77 Explain Implicit Conversion/ Widening/Automatic Type Conversion?
78 What is Explicit Conversion/Narrowing/Casting?
79 Can a double value be cast to byte? How to cast double value to byte with help of the
example?
80 Can a Boolean primitive value to be converted to any other primitive in java?
81 What is autoboxing and autounboxing?
82 What are advantages of autoboxing and autounboxing?
83 How to cast objects or what is object casting?
84 What is upcasting or downcasting?
Exception Handling
85 State some situations where exceptions may arise in java?
86 What is Exception handling in java?
87 What is an eror in Java?
88 What are advantages of Exception handling in java?
89 In how many ways we can do exception handling in java?
90 List out five keywords related to Exception handling ?
91 Explain try and catch keywords in java?
92 Can we have try block without catch block?
93 Can we have multiple catch block for a try block?
94 Explain importance of finally block in java?
95 Can we have any code between try and catch blocks?
96 Can we have any code between try and finally blocks?
97 Can we catch more than one exception in single catch block?
98 What are checked Exceptions?
99 What are unchecked exceptions in java?
100 Explain differences between checked and Unchecked exceptions in java?
101 What is default Exception handling in java?
102 Explain throw keyword in java?
103 Can we write any code after throw statement?
104 Explain importance of throws keyword in java?
105 Explain the importance of finally over return statement?
106 Explain a situation where finally block will not be executed?
107 Can we use catch statement for checked exceptions?
108 What are user defined exceptions?
109 Can we rethrow the same exception from catch handler?
110 Can we nested try statements in java?
111 Explain the importance of throwable class and its methods?
112 Explain when ClassNotFoundException will be raised ?
113 Explain when NoClassDefFoundError will be raised ?
Class Loaders
269 What are classloaders and different types of class loaders in java?
270 What is BootStrap class loader and how does it works?
271 What is Extensions class loader and how does it works?
272 What is application class loader and how does it works?
273 When an object becomes eligible for garbage collection?
274 Who performs garbage collection?
275 When does garbage collector run?
276 Which algorithm garbage collector uses to perform garbage collection?
277 List out different garbage collection algorithms?
278 Can we force JVM for garbage collection?
279 How to request jvm to perform garbage collection operation?
280 Explain the purpose of finalize method in relation to Garbage collection?
281 How many times finalize method is called on an Object?
282 Once an object is garbage collected can it become reachable again?
283 How to write a code that makes an object eligible for garbage collection?