Constructors QuizS2C Home « Constructors Quiz

The questions in this Java quiz are on the topics covered in the java - Objects & Classes section of the site. The table below lists the lesson used for each quiz, a description of the lesson content and the quiz number and questions associated with that lesson.

Lesson Summary

Click on a lesson in the table to go to that lesson for a refresher on the topics for that quiz.

Click on a quiz in the table to go straight to the quiz for a particular lesson.

Objects & Classes Lessons Description Quiz Info.
Lesson 1 - ArraysIn this lesson we look at arrays and how to use them in java.Quiz1
8 questions
Lesson 2 - Class Structure & SyntaxFor this lesson we looked at class structure and syntax within our Java programs.Quiz2
8 questions
Lesson 3 - Reference VariablesThis lesson is about reference variables and how to use them within our Java programs.Quiz3
7 questions
Lesson 4 - MethodsWe have used methods throughout the lessons so far so its time for a thorough investigation of what we can do with these members.Quiz4
10 questions
Lesson 5 - Instance Variables & ScopeThis lesson is about instance variables, how to use them and their scope.Quiz5
6 questions
Lesson 6 - ConstructorsIn this lesson we learn about constructors, which we can use to instantiate objects of our classes.This quiz.
7 questions
Lesson 7 - Static MembersFor this lesson we investigate what static means and how to apply it to our class members.Quiz7
6 questions
Lesson 8 - EnumerationsIn our final lesson of this section we go through enumerations which were introduced in java.Quiz8
8 questions

Java Objects & Classes Quiz 6

The quiz below tests your knowledge of the material learnt in Objects & Classes - Lesson 6 - Constructors.

Question 1 : How many parameters in a default constructor?
- The default constructor has no parameters.
Question 2 : What differentiates a constructor and a method?
- constructors have no return type.
Question 3 : The compiler always provides a default no-arg constructor?
- The compiler only provides a default no-arg constructor when no other constructors are present.
Question 4 : 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 overloaded constructors.
Question 5 : What does the keyword this refer to?
- The keyword <code>this</code> refers to the current object.
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 : 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 on Java Objects & Classes is all about static members.