This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java in General and the fly likes About the class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "About the class "Class"" Watch "About the class "Class"" New topic
Author

About the class "Class"

Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3827

Hi Friends,

I found this in the java API here

The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects.


But we can't get the class from the primitive data types can we? It's built in to java, is it?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3506
    
  14
Originally posted by Vijitha Kumara:
Hi Friends,

I found this in the java API here



But we can't get the class from the primitive data types can we? It's built in to java, is it?


int.class, float.class, etc will give you the Class instance for each of the primitive types.


Joanne
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: About the class "Class"