What happens if a Java class has no constructors defined?
What happens if a Java class has no constructors defined?
- A.
The compiler throws an error
- B.
The compiler adds a default constructor automatically
- C.
A parameterized constructor is added by default
- D.
The object cannot be created using new keyword
- E.
Only static methods can be accessed
Attempted by 243 students.
Sign up free to check your answer
Sign up freeLoading lesson…

