Ch 2 Questions #4

 

More on Classes

 

 

1.         How do you instantiate a String object?

 

2.         How do you determine the length of a String object?

 

3.         What is the return type of the length() method of a String object?

 

4.         What is a wrapper class?

 

5.         What is a package in Java?

 

6.         What is the function of the import declaration?

 

7.         How are random numbers generated by the Random() class?

 

8.         Why are the methods of the Math class declared static?

 

9.         How would you represent currency in a Java application program?

 

10.       How would you format a double to have two number after the decimal place?