Java Chapter 8: Classes and Objects Quiz

SharpestAspen avatar
SharpestAspen
·

Start Quiz

Study Flashcards

12 Questions

Which keyword is used to declare Class variables and class methods?

static

What operator creates an object and returns its reference?

new

Which type of method can be called without creating an instance of a class?

Class method

What refers to more than one method having the same name but different parameters?

Overloaded methods

Which method is invoked automatically with the creation of an object?

Constructor

Which keyword is used to refer to a superclass constructor in a subclass constructor?

super

Which method of a Java class is invoked automatically with the creation of an object?

Constructor

What is the keyword used in Java to call the constructor of the superclass in the constructor of a subclass?

Super

How many levels of visibility are used to protect a method or variable from unauthorized reference in Java?

2

In Java, what component generally makes up a class?

Both (A) and (B)

Which operator in Java allows access to instance variables and instance methods?

. (Full stop)

What differentiates a Constructor from a general method in Java?

All of these

Test your knowledge on classes and objects in Java with this quiz. Questions cover defining attributes, declaring class variables and methods, creating objects, and calling methods without creating an instance of a class.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser