joannazhang13
Quiz by , created more than 1 year ago

Quiz on java classes and objects

73
1
0
joannazhang13
Created by joannazhang13 over 9 years ago
Close

Classes and Objects Quiz

Question 1 of 8

1

An object is characterized by:

Select one of the following:

  • State and Validity

  • Validity and Accessibility

  • State and Behavior

  • Behavior and Accessibility

Explanation

Question 2 of 8

1

A variable that represents an object is called

Select one of the following:

  • Conjugate

  • Abstract

  • Type

  • Object reference

Explanation

Question 3 of 8

1

State of a given object is maintained in its

Select one of the following:

  • Algorithms

  • Instance variables

  • Encapsulations

  • Behaviors

Explanation

Question 4 of 8

1

Combining an object's data and methods into a class is called

Select one of the following:

  • Encapsulation

  • Implementation

  • Inheritance

  • Boxing

Explanation

Question 5 of 8

1

Public methods are accessible to:

Select one of the following:

  • Some client programs

  • All client programs

  • All client programs that asks for return value

  • All client programs that are abstract

Explanation

Question 6 of 8

1

Static variables are shared by:

Select one of the following:

  • All instances of the class

  • All instances of the class that are private

  • All instances of the class that are public

  • Some instances of the class depending on what the static variable specifies.

Explanation

Question 7 of 8

1

A constructor

Select one of the following:

  • Must have arguments

  • Cannot be the same as the class

  • Creates and object of the class

  • Has a return type based on the class

Explanation

Question 8 of 8

1

Static methods

Select one of the following:

  • Must have a return type

  • Cannot access instance variables

  • Can access instance variables

  • Must not have a return type

Explanation