A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch 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]
rocket mass heater
subject: casting String into double
Question about Boxing
who can tell what is the method parseInt( )?
Setting Cell Editors in J(X)Table
Having problems with an arrays assignment
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015