Important Questions [8]
- When is a constructor invoked?
- Name the following: The method which has same name as that of the class name.
- Write Two Characteristics of a Constructor.
- Differentiate Between Constructor and Function.
- Write the Output of the Following Program Code:Char Ch ; Int X=97; Do { Ch=(Char) X; System.Out.Print(Ch + “ ” ); If(X%10 == 0) Break; ++X; }While(X<=100);
- What is a Parameterized Constructor?
- Name the two types of constructors.
- If the name of the class is "Yellow", what can be the possible name for its constructors?
