jQuery in Action, 2nd edition*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 3838

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: 3720
    
  16
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
 
Don't get me started about those stupid light bulbs.
 
subject: About the class "Class"