wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes converting object to double? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

converting object to double?

sahar sa
Ranch Hand

Joined: Jul 06, 2009
Posts: 102
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

Joined: Apr 14, 2004
Posts: 10336

Please don't post the same question more than once.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: converting object to double?
 
Similar Threads
array error -- incompatible types
ClassCastError vs. Compilation Error
AWT: Painting buttons
Double question
converting object[] to double?