aspose file tools*
The moose likes Beginning Java and the fly likes why does Object.class compile? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "why does Object.class compile?" Watch "why does Object.class compile?" New topic
Author

why does Object.class compile?

Gary Snider
Greenhorn

Joined: Apr 20, 2004
Posts: 2
Can someone tell me where the .class attribute is documented? It is not in the api and not even in Object.java source code. Obviously Object.getClass() works and is documented. I've seen the .class attribute used quite frequently in production code and it irks me that it is just used and not documented. Perhaps it is in the JLS? I searched once but couldn't find it.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Here. It's not technically an attribute, though it looks like one. It's unique feature in the Java language.


"I'm not back." - Bill Harding, Twister
Gary Snider
Greenhorn

Joined: Apr 20, 2004
Posts: 2
Thanks for the info.
I guess it was in the JLS after all.
 
Don't get me started about those stupid light bulbs.
 
subject: why does Object.class compile?