View Single Post
Old 05-07-2009, 02:59 PM   #1 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default 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??
__________________
Tanax is offline  
Reply With Quote