Q1
In Java OOP, which option best describes a class?
Q2
Which OOP concept is mainly about hiding internal state and exposing controlled access?
Q3
Which keyword is commonly used to create an object in Java?
Q4
Which member is shared by all objects of the same class?
Q5
Which statement about a constructor in Java is correct?
Q6
Which access modifier gives the strongest data hiding inside a class?
Q7
Which OOP pillar is most directly related to showing only essential behavior?
Q8
A class keeps fields private and allows updates only through validated methods. This is mainly an example of:
Q9
Which statement about abstract classes is correct?
Q10
By default, a field declared inside a Java interface is:
Q11
Which statement about an abstract class is true?
Q12
Which statement is correct for a Java class?
Q13
Why does Java avoid multiple inheritance of classes?
Q14
What is the main use of `super()` inside a constructor?
Q15
What is the main use of `this()` inside a constructor?
Q16
Which statement about constructors in Java is correct?
Q17
Which relationship usually shows the strongest ownership and lifecycle dependency?
Q18
Which example best represents an IS-A relationship?
Q19
Which example best represents a HAS-A relationship?
Q20
Which option is the best sign of an immutable class?
Q21
Method overloading in Java is mainly resolved at:
Q22
Method overriding in Java is mainly resolved at:
Q23
Which change is required for valid method overloading?
Q24
Can a private method be overridden in a subclass?
Q25
What happens if a method is marked `final` in the parent class?
Q26
How are static methods treated in inheritance?
Q27
Which setup is required for runtime polymorphism?
Q28
For object fields with the same name in parent and child classes, access is mainly decided by:
Q29
Which return type change is allowed while overriding a method?
Q30
What is the likely result of downcasting a parent reference that does not actually point to that child type?
Q31
Which statement about upcasting is correct?
Q32
If a parent reference points to a child object and an overridden method is called, which version runs?
Q33
When overriding a method, the child method's access level must be:
Q34
Which checked exception rule is correct for method overriding?
Q35
What is the main use of `instanceof` before downcasting?
Q36
Which statement about interfaces is correct?
Q37
If a class implements two interfaces that provide the same default method, what must the class do?
Q38
A functional interface in Java must have:
Q39
What is a marker interface?
Q40
Which statement about constructors in interfaces is correct?
Q41
For objects in Java, what does `==` compare?
Q42
If a class does not override `equals()`, what behavior does it inherit?
Q43
What is the main risk of overriding `equals()` but not `hashCode()`?
Q44
Which statement must always be true for two equal objects?
Q45
Which class is the root parent of all Java classes?
Q46
Which commonly used Java class is immutable?
Q47
What kind of copy is usually created by default cloning behavior?
Q48
What is true about a non-static inner class?
Q49
What is true about a static nested class?
Q50
When is an anonymous class usually most appropriate?
Q51
Which statement about abstract classes is correct?
Q52
Modern Java interfaces may contain which kinds of methods?
Q53
What does declaring a class as `final` prevent?
Q54
What does `final` mean for a variable?
Q55
Which statement about a static variable is correct?
Q56
When is composition usually preferred over inheritance?
Q57
Which statement best explains the value of polymorphism?
Q58
If two references point to the exact same object, which statement is guaranteed?
Q59
Can an abstract class implement an interface without implementing all of its methods?
Q60
Which choice best supports loose coupling in Java OOP design?