Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Object identification

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can you identify an object from a given problem?
e.g. Problem is "Accept Login name and Password.Update the values in a file by using encryption algorithms"
[This message has been edited by Sharat M (edited June 26, 2000).]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
though u r question is not clear i assume u would like to know how to find out the name of the class of a given object instance.
In case u want more info about a given class use the reflection API.
I have written a small program for this.

class demo
{
public static void main(String[] args)
{
demo c=new demo();
String s=c.getClass().getName();
System.out.println(s);
}
}
Hope this helps.
Regards.
Rahul
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic