Quiz icon
Knowledge quiz
It’s time to put what you’ve learned to the test, get 7 questions right to pass this unit.
Which of the following signature elements may an instance constructor have?
There are two correct answers.
A class class contains the public static method method. What is the correct code to call this method?
Choose the correct answer.
The static constructor is executed when the class is addressed for the first time. When might this be?
There are two correct answers.
A functional method must have
Choose the correct answer.
In which order do you define the visibility sections of a class?
Choose the correct answer.
You have declared two reference variables, ref1 and ref2. ref1 points to an object. You now execute the statement ref2 = ref1. What happens?
Choose the correct answer.
Your class contains a public instance attribute attr. How could you ensure that its value can only be changed within the class?
There are two correct answers.
You have defined a class containing instance attributes and static attributes. You have also declared a reference variable but not yet created a new instance of the class. Which components of the class can you access at this point, and how?
Choose the correct answer.

To complete the knowledge quiz you need to create an account or login