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?

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!