jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes String.class - What member is this ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String.class - What member is this ?" Watch "String.class - What member is this ?" New topic
Author

String.class - What member is this ?

shukla raghav
Ranch Hand

Joined: Aug 03, 2008
Posts: 200
While studying struts i was reading about Type Conversions and in one of the methods implemented for the Converter i saw this kind of an expression



Now i may sound like stupid to so many but i never heard a static member called class in String class. I kept searching the API i could not find such a member in the String class, or Object or Class class or even the CharSequence class. what is this member and another such member that i am intregued about is the

String.TYPE

why does the API not show about these members. Is this some new development. All the drop-down assistence in eclipse shows such a static member for String. Which version has it ? Why was the need for a class member as well as TYPE member in the classes.What good do they do if they really exist and they are no GHOST members
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Class literals

Not new at all.
 
 
subject: String.class - What member is this ?
 
Similar Threads
OOP Object Construction
java does not support multiple inheritance. Is it a limitation to java?
Have a question about inner class
Static members | Inheritance
Generics - static variables and methods of a class are shared among all the instances