Java Classes and Objects
Java Classes and Objects - Important Points
31. | Which keyword is used to refer to the current object in Java? |
---|
A. this
B. object
C. self
D. current
View Answer Discuss Work SpaceAnswer: option a
Explanation:
32. | Which of the following is not a modifier in Java? |
---|
A. final
B. static
C. non-static
D. public
View Answer Discuss Work SpaceAnswer: option c
Explanation:
33. | Which of the following is true about inheritance in Java? |
---|
A. It allows a class to inherit the properties of another class.
B. It allows a class to inherit the properties of an object.
C. It allows an object to inherit the properties of a class.
D. It allows an object to inherit the properties of another object.
View Answer Discuss Work SpaceAnswer: option a
Explanation:
34. | Which of the following is true about method signature in Java? |
---|
A. It consists of method name and parameter types.
B. It consists of method name and return type.
C. It consists of method name, parameter types, and return type.
D. It consists of method name and access specifier.
View Answer Discuss Work SpaceAnswer: option a
Explanation:
35. | Which of the following is true about method return type in Java? |
---|
A. It specifies the name of the method.
B. It specifies the access specifier of the method.
C. It specifies the type of value returned by the method.
D. It specifies the type of parameters accepted by the method.
View Answer Discuss Work SpaceAnswer: option c
Explanation: