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:
- 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?
- What
is the name of the data structure in Java that can store objects?
- Which
of these is not primitive, something that is a double or a String?
- If you
want to compare two Strings, what method from the String class must you
use?
- If we
want to print out an object from a class that WE create, what method from
the Object class MUST we override?
- What
is the highest number that the Random class method nextInt(100)
would return?
- How
many constructors should our Coin class have?