Advertisement

[java] Simple Question (Need answer fast!!!)

Started by July 13, 2000 09:48 PM
2 comments, last by Delisk 24 years, 5 months ago
I try really hard to find how to do this... I need to transfer the conten of a String (who only contain number) to a long variable. My long variable is call: Number1 My String is call: N1 I know the keyword parse as something to to with this... Please post code! Thanks!
Here you go: (java source code)

        long Number1 = Long.parseLong(N1);        


Hope this helped.

=============================
silly programmer vb is for kids.

Edited by - loserkid on July 13, 2000 11:23:57 PM
==============================================I feel like a kid in some kind of store... ============================================== www.thejpsystem.com
Advertisement

char string = "12345";
long number = atol(&string);

Is this what you''re looking for?

When life hands you lemons, throw them at God's head.
Don''t try to confuse him, asmLOCK

This topic is closed to new replies.

Advertisement