#JavaThisKeyword
#JavaInheritance
#JavaSuperclass
#NoMultipleInheritance
#JavaComposition
#AggregationVsComposition
#NoPointersInJava
#NullPointerException
#JavaSuperKeyword
#ThisAndSuper
#ObjectCloning
#JavaStaticVariable
#StaticVariableBestPractices
#StaticMethodPurpose
#StaticMainMethod
#StaticBlockUsage
#NoMainMethodExecution
#MainMethodSignature
#StaticVsInstanceMethod
#MethodOverloading
#MethodOverriding
21. What is the purpose of ‘this’ keyword in java?
22. Explain the concept of Inheritance?
23. Which class in Java is superclass of every other class?
24. Why Java does not support multiple inheritance?
25. In OOPS, what is meant by composition?
26. How aggregation and composition are different concepts?
27. Why there are no pointers in Java?
28. If there are no pointers in Java, then why do we get
NullPointerException?
29. What is the purpose of ‘super’ keyword in java?
30. Is it possible to use this() and super() both in same constructor?
31. What is the meaning of object cloning in Java?
Static
32. In Java, why do we use static variable?
33. Why it is not a good practice to create static variables in Java?
34. What is the purpose of static method in Java?
35. Why do we mark main method as static in Java?
36. In what scenario do we use a static block?
37. Is it possible to execute a program without defining a main() method?
38. What happens when static modifier is not mentioned in the signature
of main method?
39. What is the difference between static method and instance method in
Java?
Method Overloading and Overriding