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

converting object to double?

 
sahar sa
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Report post to moderator
Dear,
I have a method called (getContentObject) which returns me an Object[]. I have a piece of code like this:

result = (Object[]) reply.getContentObject();
double price = Double.parseDouble((String)result[2]);

actually in the last line I've tried to convert object to double but I cant. can you tell me how can I make it ?

Thanks,
Sahar.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic