How to turn it in: Turn in the file electronically
as instructed on the web page.
1. [5 pts] Name 8 Java primitive types.
2. [5 pts] In order for the public class MyClass to successfully compile,
which of the following must be true?
a) MyClass must have a correctly formed main() method.
b) MyClass must be defined in the file MyClass.java
c) MyClass must be defined in the MyClass package.
d) MyClass must be imported
3. [5 pts] Java provides two ways to compare if 2 items are the same : == and the .equals() method. State the criterion you use to decide which of these to use?
4. [2 pts] Which is the class at the top of the Java platform inheritance hierarchy?
5. [3 pts] Look up the documentation for the Button class from the Sun's
website and list the names of all the methods that are inherited by the
ToggleButton class in the book. The ToggleButton class is discussed on
page 201 of the text book(code in fig 4-21).