"how to convert string to long " Code Answer


this is a common way to do it:

long l = long.parselong(str);

there is also this method: long.valueof(str); difference is that parselong returns a primitive long while valueof returns a new long() object.

By LanceSc on August 19 2022

Answers related to “how to convert string to long ”

Only authorized users can answer the Search term. Please sign in first, or register a free account.