Exam 7: Introduction to Classes and Objects

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following statements is true?

Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
Verified

C

How many Book objects are created by the following statement? Book[] books = new Book[10];

Free
(Multiple Choice)
4.9/5
(42)
Correct Answer:
Verified

B

Each class you create becomes a new ________ that can be used to declare variables and create objects.

Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
Verified

D

Declaring instance variables ________ is known as data hiding or information hiding.

(Multiple Choice)
4.9/5
(38)

A static method can ________.

(Multiple Choice)
4.9/5
(34)

Consider integer array values, which contains 5 elements. Which statements successfully swap the contents of the array at index 3 and index 4?

(Multiple Choice)
4.7/5
(41)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(37)

What kind of application tests a class by creating an object of that class and calling the class's methods?

(Multiple Choice)
4.8/5
(33)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(26)

A __________ of a class called myClass is another class whose methods call the methods of myClass.

(Multiple Choice)
4.8/5
(32)

Which of the following statements is true?

(Multiple Choice)
4.9/5
(26)

Which of the following statements is true?

(Multiple Choice)
4.8/5
(42)

Assume class Book has been declared. Which set of statements creates an array of Books?

(Multiple Choice)
4.8/5
(40)

Which of the following statements is true?

(Multiple Choice)
4.8/5
(33)

The format specifier %.2f specifies that two digits of precision should be output ________ in the floating-point number.

(Multiple Choice)
4.7/5
(25)

When a method terminates, the values of its local variables are ________.

(Multiple Choice)
4.9/5
(44)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(40)

Which of the following statements is false?

(Multiple Choice)
4.7/5
(40)

You can declare new classes as needed; this is one reason Java is known as a(n) ________ language.

(Multiple Choice)
5.0/5
(32)

Java requires a ________ call for every object that's created.

(Multiple Choice)
4.8/5
(41)
Showing 1 - 20 of 27
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)