Q: A Java constructor is like a method without ___.
Solution: no solution
Q: The name of a constructor and the name of a class are ___.
Solution: no solution
Q: The placement of a constructor inside a class should be ___.
Solution: no solution
Q: The purpose of a Java constructor is ___.
Solution: no solution
Q: Memory is allocated to an object once the execution of ___ is over in Java language.
Solution: no solution
Q: What is the output of the below Java program? public class TestingConstructor { void TestingConstructor() { System.out.println("Amsterdam"); } TestingConstructor() { System.out.println("Antarctica"); } public static void main(String[] args) { TestingConstructor tc = new TestingConstructor(); } }
Solution: Here the constructor is TestingConstructor() without return type.
Q: In Java, a constructor with no parameters or no arguments is called ___ constructor.
Solution: no solution
Q: In Java, a constructor with one or more arguments or parameters is called a ___ constructor.
Solution: no solution
Q: The compiler adds a default no-argument constructor to a class if it ___.
Solution: no solution
Q: Overloading of constructors in Java means adding more than ___ constructors with the different argument list.
Solution: no solution
You Have Score    | /10 |