Java Reference
In-Depth Information
12. The
instanceof
operator tests whether an object belongs to a particular type.
13. An abstract method is a method whose implementation is not specified.
14. An abstract class is a class that cannot be instantiated.
15. A field or method that is not declared as
public
,
private
, or
protected
can be accessed by all classes in the same package, which is usually not
desirable.
16. Protected features can be accessed by all subclasses and all classes in the same
package.
17. Define the
toString
method to yield a string that describes the object state.
18. Define the
equals
method to test whether two objects have equal state.
19. The
clone
method makes a new object with the same state as an existing
object.
20. Define a
JFrame
subclass for a complex frame.
21. Use
JTextField
components to provide space for user input. Place a
JLabel
next to each text field.
22. Use a
JTextArea
to show multiple lines of text.
23. You can add scroll bars to any component with a
JScrollPane
.
488
489
FURTHER READING
1. James Gosling, Bill Joy, Guy Steele, and Gilad Bracha, The Java
Language Specification, 3rd edition, Addison-Wesley, 2005.
2.
http://www.mozilla.org/rhino
The Rhino interpreter for the JavaScript
language.