Static Members QuizS2C Home « Static Members 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.Quiz6
7 questions
Lesson 7 - Static MembersFor this lesson we investigate what static means and how to apply it to our class members.This quiz.
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 7

The quiz below tests your knowledge of the material learnt in Objects & Classes - Lesson 7 - Static Members.

Question 1 : What do static variables apply to?
- Static variables apply to a class
Question 2 : We use static and which keyword to define a Java constant?
- We use the <em>final</em> keyword.
Question 3 : We prefix static variables with the name of the method?
- We prefix static variables with the name of the class.
Question 4 : Which runs first after a class has loaded?
- Static initializer blocks.
Question 5 : Can we initiailize Java constants in a method?
- Java constants can only be initialized when they are defined or in a static initializer block.
Question 6 : When defining a Java constant which comes first?
- It doesn't matter in which order these keywords appear.
Quiz Progress Bar Please select an answer

What's Next?

The next quiz on Java Objects & Classes is all about enumerations.