πŸ“Š JAVA
Q. What is the prototype of the default constructor?
public class Test { }
  • (A) public Test(void)
  • (B) Test( )
  • (C) Test(void)
  • (D) Test(void) D. public Test( )
πŸ’¬ Discuss
βœ… Correct Answer: (D) Test(void) D. public Test( )

Explanation: Option A and B are wrong because they use the default access modifier and the access modifier for the class is public (remember, the default constructor has the same access modifier as the class).

Explanation by: Admin
Option A and B are wrong because they use the default access modifier and the access modifier for the class is public (remember, the default constructor has the same access modifier as the class).

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
109
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
97%
Success Rate