05-07-2009, 02:59 PM
|
#1 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Java help(again)
Hiya, again!
I'm here with another Java problem.
I have a Bank program, and an add button, which would let you add a customer to the Bank. Problem is, that I need the social security number to be of the type "long".
Currently looks like this:
Code:
public Boolean addCustomer_logic()
{
String number = this.addCustNumber_textfield.getText();
String name = this.addCustName_textfield.getText();
int nr = Integer.parseInt(number);
return this.logic.addCustomer(nr, name);
}
As you see, I'm parsing Int. How can I convert an input string to long??
__________________
|
|
|
|