• Post Reply Bookmark Topic Watch Topic
  • New Topic

convert string to class object in java  RSS feed

 
chamini prashakthi
Ranch Hand
Posts: 127
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to convert string to class object in java?
 
praveen kumaar
Ranch Hand
Posts: 461
22
Android Chrome Eclipse IDE Google App Engine Java Notepad Oracle Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean you are having a string representation of any class and you need to build a "Class" type object from it?
 
chamini prashakthi
Ranch Hand
Posts: 127
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no I have a string object in my class.I want to convert it to class object(to call methods in my class)
 
praveen kumaar
Ranch Hand
Posts: 461
22
Android Chrome Eclipse IDE Google App Engine Java Notepad Oracle Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please show me the code whatever you have or tried.i don't get your point?
 
praveen kumaar
Ranch Hand
Posts: 461
22
Android Chrome Eclipse IDE Google App Engine Java Notepad Oracle Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be the casting to Object can help but can you not call methods on String?
 
Paul Clapham
Sheriff
Posts: 22821
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chamini prashakthi wrote:no I have a string object in my class.I want to convert it to class object(to call methods in my class)


I don't get it either. So maybe you can give us an example of what you want to happen if you have a particular string. For example, if your String object contains "A22,33B" what kind of object would you like to convert that to? Or if that's not a String you are likely to encounter, show us a better example.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!