A LITTLE TEST OF YOUR SEARCHING SKILLS…

 

 

Based upon the text at http://www.mrmerlis.com/classes/java1/Coin/coinClass.htm

 

Answer the following questions:

 

 

 

  1. We want to be able to flip our coins.  In order to do this, we need to use the “Random” class from the API.  What is the line we need to include at the top of our class so that we can use Random numbers?

 

 

 

 

 

  1. What is the name of the data structure in Java that can store objects?

 

 

 

 

  1. Which of these is not primitive, something that is a double or a String?

 

 

 

 

  1. If you want to compare two Strings, what method from the String class must you use?

 

 

 

 

 

  1. If we want to print out an object from a class that WE create, what method from the Object class MUST we override?

 

 

 

 

 

  1. What is the highest number that the Random class method nextInt(100) would return?

 

 

 

 

 

 

  1. How many constructors should our Coin class have?