Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.Class

 
Sowjanya Chowdary
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please anyone explain me what is the use of java.lang.Class.
I had gone through java api, but didn't got clear idea.

Thanks in advance for any help.

-Amrutha
 
Stuart Ash
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might help you.

http://www-128.ibm.com/developerworks/java/library/j-dyn0429/
[ December 04, 2005: Message edited by: Stuart Ash ]
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are times when you need to work with the class of an object as an object. Look at some tutorials on Reflection, as this is one of the more common cases. Another case is if you need to load files from the class-path using Class.getResourceAsStream().
 
Sowjanya Chowdary
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many thanks to Stuart & Scott for the information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic