View the step-by-step solution to:

Question

1) If you do not write constructor method for your class, Java will provide one for you. true or false

/>

2) What does immutable mean?

A. strong

B. unchangeable

C. flexible

D. changeable


3) When the address of an object is not stored in any reference variable, that object is known as a(n)

A. Empty object

B. orphan

C. Null object

D. Extra object


4) Which debugger command allows you to go into the code at a method call?

A step

B step into

C continue

D terminate


5) What is the return data type of the String class equals( ) method?

A) boolean

B int

C Depends on what type of data the obect holds

D String


6) What is the return type of the String class compareTo( ) method?

A boolean

B int

C String

D coid


7) A class can have many different constructor methods as long as the names are different.

A True

B False


8) In a class definition file, each method must have a different name.

A True

B false


9) A class is an object.

A True

B False


10) Only one instance can be created from a class definition.

A true

B false


11) Once an object is created you can call the constructor method again to change the value of the fields

A true

B false


12) A constructor for a class can be called many times to create instances

A True

B False


13) Fields are usually given private access

A True

B false


14) Once an object is created the fields should not change their values

A True

B False


15) int x = 5;

y = x++;

What is the value of y?


A 4

B 5

C 6

D junk

Top Answer

Here is the solution... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question