About 280,000 results
Open links in new tab
  1. How to convert String to long in Java? - Stack Overflow

    Oct 7, 2011 · The best approach is Long.valueOf(str) as it relies on Long.valueOf(long) which uses an internal cache making it more efficient since it will reuse if needed the cached …

  2. Convert String to long or Long in Java - Baeldung

    Jan 10, 2024 · In this tutorial, we learn how to convert a String to a long primitive or Long object.

  3. Java Program to Convert String to Long - GeeksforGeeks

    Jul 23, 2025 · To convert a String to Long in Java, we can use built-in methods provided by the Long class. In this article, we will learn how to convert String to Long in Java with different …

  4. Convert String to long in Java - HowToDoInJava

    Learn to convert a String to Long type in Java using Long.parseLong(String), Long.valueOf(String) methods and new Long(String) constructor.

  5. Convert String to Long in Java (9 Programs) - wscubetech.com

    Learn 9 easy ways to convert a String to Long in Java with examples. Explore methods like Long.parseLong (), Long.valueOf (), Long (String), and more.

  6. Java: Converting from String to Long - javaspring.net

    Nov 12, 2025 · This blog post will provide a detailed exploration of how to convert a `String` to a `Long` in Java, including fundamental concepts, usage methods, common practices, and best …

  7. Java Program to Convert String to Long - Tutorial Gateway

    This article shows how to write a Java program to convert string to long. We can convert string to long using the parseLong () function and the Long.valueOf () function.

  8. How to Convert String to Long in Java - javathinking.com

    Oct 16, 2025 · This conversion is crucial when dealing with user input, data retrieval from external sources like files or databases, and more. In this blog post, we'll explore different ways to …

  9. Java String to long Conversion - BeginnersBook

    Dec 1, 2024 · In this tutorial, you will learn how to convert String to long in Java. We can use Long wrapper class for this purpose, this class contains couple of methods that we can use for this …

  10. Convert String to Long in Java - Tutorial Kart

    In this tutorial, we shall learn some of the ways of how to convert a string value to a long value with examples. 1. Convert string to long using Long.parseLong () Long.parseLong(str) parses …