Exam 6: A First Look at Classes

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

Data hiding,which means that critical data stored inside the object is protected from code outside the object is accomplished in Java by

(Multiple Choice)
4.8/5
(37)

Which of the following statements will create a reference,str,to the string,"Hello,world"? (1)String str = new String("Hello,world"); (2)String str = "Hello,world";

(Multiple Choice)
4.9/5
(42)

A constructor

(Multiple Choice)
4.8/5
(30)

A constructor is a method that is automatically called when an object is created.

(True/False)
4.8/5
(42)

A method that gets a value from a class's field but does not change it is known as a mutator method.

(True/False)
4.8/5
(29)

For the following code,which statement is not true? public class Sphere { Private double radius; Public double x; Private double y; Private double z; }

(Multiple Choice)
4.9/5
(32)

This refers to the combining of data and code into a single object.

(Multiple Choice)
4.8/5
(34)

Which of the following statements will create a reference,str,to the String,"Hello,World"?

(Multiple Choice)
4.9/5
(31)

Overloading means multiple methods in the same class

(Multiple Choice)
4.9/5
(49)
Showing 41 - 49 of 49
close modal

Filters

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