Overloaded Constructors and this QuizJ8 Home « Overloaded Constructors and this Quiz

Java Objects & Classes Quiz 11

The quiz below tests your knowledge of the material learnt in Objects & Classes - Lesson 11 - Overloaded Constructors and this.

Question 1 : Having the same argument lists for constructors in a class is ok?
- Having the same argument lists for constructors in a class is NOT ok, having the same argument types is ok as long as the order differs.
Question 2 : When you have more than one constructor in a class these are known as?
- When you have more than one constructor in a class these are known as <i;>overloaded</i;> constructors.
Question 3 : Having the same argument types for constructors in a class is ok?
- Having the same argument types for constructors in a class IS ok as long as the order differs.
Question 4 : What does the keyword this refer to?
- The keyword <code>this</code> refers to the current object.
Question 5 : You can invoke one constructor from another constructor within the same class?
- You CAN invoke one constructor from another constructor within the same class and doing so is known as <i>explicit constructor invocation</i>.
Question 6 : When using overloaded constructors what must we ensure?
- When using overloaded constructors we must ensure that they have different argument lists, so the compiler can differentiate between them.
Question 7 : You can refer to any member of the current object from within a static method or constructor by using the this keyword?
- You CANNOT refer to <code>this</code> from within a static method.
Question 8 : Which of the following is true?
- You cannot use <code>this</code> and <code>super</code> together.
Question 9 : We invoke constructors within the same class using the new keyword?
- We invoke constructors within the same class using the <code>this</code> keyword
Quiz Progress Bar Please select an answer


What's Next?

The next quiz tests your knowledge of what the static keyword means and how to use static variables.