Java String to long

We can convert String to long in java using Long.parseLong() method.


It is generally used if we have to perform mathematical operations on the string that contains long number. Whenever we get data from textfield or textarea, entered data is received as a string. If entered data is long, we need to convert string to long. To do so, we use Long.parseLong() method.


public static long parseLong(String s)


Flash Soon


© Sapster 2017