Instance Variables & Scope QuizS2C Home « Instance Variables & Scope 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.This quiz.
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.This quiz.
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.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 5

The quiz below tests your knowledge of the material learnt in Objects & Classes - Lesson 5 - Instance Variables & Scope.

Question 1 : What are variables created within a class and outside any method are known as?
- Variables created within a class and outside any methods are known as instance variables.
Question 2 : Instance variables live on the stack?
- Instance variables live on the heap.
Question 3 : Instance variables are unique to their class
- Instance variables are unique to an instance of the class not the class itself.
Question 4 : What is the lifetime of an instance variable?
- An instance variable exists as long as the instance of the class it belongs to.
Question 5 : What do instance variables describe?
- Instance variables describe an objects state.
Question 6 : Instance variables are declared within a method?
- Instance variables are declared within a class and outside any methods
Quiz Progress Bar Please select an answer

What's Next?

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