Java Programming
primer-original-v2mediumJava Programming04 Arrays And Stringsprimer-original-v2

Identify the true statement(s). Statement 1 : When no constructor is written in a class, the compiler creates a default constructor Statement 2 : The default constructor will implicitly invoke the default / no-argument constructor of the super class Statement 3 : If a class has a parametrized constructor alone, then the compiler will create the default constructor Statement 4 : If a class has a parametrized constructor, it is mandatory to write a no-argument constructor

Answer options

A
1, 2 and 3
B
2 and 3
C
1, 2 and 4
D
1 and 2

Correct answer: 1 and 2

Explanation

Quick AnswerThe correct answer is 1 and 2 because it directly addresses the core logic of Java Programming.

This question has been retained as-is due to its unique context.

Related Java Programming questions

Practice more Java Programming questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.