...
JAVA
August 25, 2024
OOPS
August 25, 2024
JAVA
August 25, 2024
OOPS
August 25, 2024

OOPS

Question 165
Implicit return type of a class constructor is:
A
not of class type itself
B
class type itself
C
a destructor of class type
D
a destructor not of class type
Question 165 Explanation: 
Implicit return type of a class constructor is class type itself.

Syntax For Constructors:

Access_Modifier No Return_Type Class(…)

Example:

public static main(String [ ]args)

Constructor rules:

1. Constructors are always used with a new.

2. Have the same name as that of Class

3. Does not have a return type

4. Can be Overloaded but not Overridden.

Correct Answer: B
Question 165 Explanation: 
Implicit return type of a class constructor is class type itself.

Syntax For Constructors:

Access_Modifier No Return_Type Class(…)

Example:

public static main(String [ ]args)

Constructor rules:

1. Constructors are always used with a new.

2. Have the same name as that of Class

3. Does not have a return type

4. Can be Overloaded but not Overridden.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!