Tuesday, March 10, 2015

Convert String to long in java pgm



Convert String to long

public class StringToPrimitiveLongExample
{
public static void main(String[] args)
{
String str = new String("10");
long l = Long.parseLong(str);
System.out.println(l);
   }
}

No comments:

Post a Comment