File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Need clarification on objects? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need clarification on objects?" Watch "Need clarification on objects?" New topic
Author

Need clarification on objects?

k
Greenhorn

Joined: Aug 28, 2000
Posts: 5
Hi,
I am new to JAVA. I am reading "CoreJava" book. I ran into couple of the following statments in different programs. If you know, Could you explain it?
Toolkit tj = Toolkit.getDefaultToolkit() (Page # 273)
Here is ToolKit is abstract class. I do not understand the right side part of = sign. I assume tj object is being made. I know abstract classes can not be instantiated.
Same thing here too: Container contentPane = frame.getContentPane() // here frame is a class.
Thanks,
sk
deekasha gunwant
Ranch Hand

Joined: May 06, 2000
Posts: 396
Hi k,
1)Toolkit tj = Toolkit.getDefaultToolkit() (Page # 273)
getDefaultToolkit() is a static function of Toolkit class.It returns an Object that extends the abstract Toolkit class.

2) Container contentPane = frame.getContentPane();
similarly getContentPane() function returns a container where we actually add our components.
regards
deekasha
k
Greenhorn

Joined: Aug 28, 2000
Posts: 5
Thanks for your help
-sk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need clarification on objects?