Q) In java, “this” keyword is used to
- Pass as an argument to a method.
- Refer current class object.
- Return current class object.
- All are correct.
Answer: 4
Q) Which keyword is used to refer current object of a class in Java?
- this
- new
- current
- None
Answer: 1
Q) try, catch, finally, throw, and throws keywords in java are related to
- Event handling
- string handling
- exception handling
- None of the above
Answer: 3
Q) Super keyword in java is used to
- refer current class object.
- refer static method of the class.
- refer parent class object.
- refer static variable of the class.
Answer: 3
Q) Transient keyword in java is used in
- serialization
- synchronization
- inheritance
- polymorphism
Answer: 1
Transient keyword in java is a variables modifier used in serialization. If we define any class field as transient, then it will not be serialized.