joannazhang13
Quiz por , criado more than 1 year ago

Quiz on java classes and objects

67
1
0
joannazhang13
Criado por joannazhang13 quase 9 anos atrás
Fechar

Classes and Objects Quiz

Questão 1 de 8

1

An object is characterized by:

Selecione uma das seguintes:

  • State and Validity

  • Validity and Accessibility

  • State and Behavior

  • Behavior and Accessibility

Explicação

Questão 2 de 8

1

A variable that represents an object is called

Selecione uma das seguintes:

  • Conjugate

  • Abstract

  • Type

  • Object reference

Explicação

Questão 3 de 8

1

State of a given object is maintained in its

Selecione uma das seguintes:

  • Algorithms

  • Instance variables

  • Encapsulations

  • Behaviors

Explicação

Questão 4 de 8

1

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

Selecione uma das seguintes:

  • Encapsulation

  • Implementation

  • Inheritance

  • Boxing

Explicação

Questão 5 de 8

1

Public methods are accessible to:

Selecione uma das seguintes:

  • Some client programs

  • All client programs

  • All client programs that asks for return value

  • All client programs that are abstract

Explicação

Questão 6 de 8

1

Static variables are shared by:

Selecione uma das seguintes:

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

Explicação

Questão 7 de 8

1

A constructor

Selecione uma das seguintes:

  • Must have arguments

  • Cannot be the same as the class

  • Creates and object of the class

  • Has a return type based on the class

Explicação

Questão 8 de 8

1

Static methods

Selecione uma das seguintes:

  • Must have a return type

  • Cannot access instance variables

  • Can access instance variables

  • Must not have a return type

Explicação