A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
casting String into double
Joined: Jan 10, 2007
Aug 08, 2007 16:09:00
Can anybody help me to sort this out please.
Object p=pList.getCap(); //either this
s=pList.getCap(); //or this
//here I need to cast the Object or String (any will do) into double
//to send it as an argument to coldDrinks(int, double) method
Thanks in advance.
author and iconoclast
Joined: Jul 08, 2003
Aug 08, 2007 16:38:00
Well, the question is, what does getCap() actually return? Is it a String? If so, look at the static parseDouble() method in the
[Jess in Action]
I agree. Here's the link:
subject: casting String into double
who can tell what is the method parseInt( )?
Question about Boxing
Having problems with an arrays assignment
Setting Cell Editors in J(X)Table
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014