joannazhang13
Quiz von , erstellt am more than 1 year ago

Quiz on java classes and objects

67
1
0
joannazhang13
Erstellt von joannazhang13 vor etwa 9 Jahre
Schließen

Classes and Objects Quiz

Frage 1 von 8

1

An object is characterized by:

Wähle eine der folgenden:

  • State and Validity

  • Validity and Accessibility

  • State and Behavior

  • Behavior and Accessibility

Erklärung

Frage 2 von 8

1

A variable that represents an object is called

Wähle eine der folgenden:

  • Conjugate

  • Abstract

  • Type

  • Object reference

Erklärung

Frage 3 von 8

1

State of a given object is maintained in its

Wähle eine der folgenden:

  • Algorithms

  • Instance variables

  • Encapsulations

  • Behaviors

Erklärung

Frage 4 von 8

1

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

Wähle eine der folgenden:

  • Encapsulation

  • Implementation

  • Inheritance

  • Boxing

Erklärung

Frage 5 von 8

1

Public methods are accessible to:

Wähle eine der folgenden:

  • Some client programs

  • All client programs

  • All client programs that asks for return value

  • All client programs that are abstract

Erklärung

Frage 6 von 8

1

Static variables are shared by:

Wähle eine der folgenden:

  • 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.

Erklärung

Frage 7 von 8

1

A constructor

Wähle eine der folgenden:

  • Must have arguments

  • Cannot be the same as the class

  • Creates and object of the class

  • Has a return type based on the class

Erklärung

Frage 8 von 8

1

Static methods

Wähle eine der folgenden:

  • Must have a return type

  • Cannot access instance variables

  • Can access instance variables

  • Must not have a return type

Erklärung