About 54 results
Open links in new tab
  1. Java - Convert integer to string - Stack Overflow

    int i = 1234; String str = Integer.toString(i); Returns a String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if …

  2. How do I convert a String to an int in Java? - Stack Overflow

    Alternatively, you can use an Ints method from the Guava library, which in combination with Java 8's Optional, makes for a powerful and concise way to convert a string into an int:

  3. java - How do I convert from int to String? - Stack Overflow

    Nov 5, 2010 · If you say ""+i, Java creates a StringBuilder object, appends an empty string to it, converts the integer to a string, appends this to the StringBuilder, then converts the StringBuilder to a String.

  4. java - What is the most efficient way to convert an int to a String ...

    May 31, 2017 · The first two examples are actually identical, since String.valueOf (int) uses the Integer.toString (int) method. The third is ugly, and probably less efficient since concatenation is slow …

  5. java - Integer to String conversion methods - Stack Overflow

    Sep 27, 2010 · String oneAsString = "1"; int one = Integer.parseInt(oneAsString); There is also a page in the Sun Java tutorial called Converting between Numbers and Strings.

  6. Integer.toString (int i) vs String.valueOf (int i) in Java

    Feb 2, 2023 · I am wondering why the method String.valueOf(int i) exists ? I am using this method to convert int into String and just discovered the Integer.toString(int i) method. After looking the …

  7. ¿Cómo convertir un String en Int en Java? [duplicada]

    ¿Cómo convertir un String en Int en Java? [duplicada] Formulada hace 8 años y 9 meses Modificada hace 8 años y 9 meses Vista 216k veces

  8. Guia definitiva de conversión de tipos en Java - Stack Overflow en ...

    Guia definitiva de conversión de tipos en Java Convertir String a Integer Convertir Integer a String Convertir char a String Convertir String a char Convertir String a Double Convertir Double a Str...

  9. java - Как перевести int в String? - Stack Overflow на русском

    Feb 21, 2021 · Как перевести int в String? Вопрос задан 11 лет 9 месяцев назад Изменён 4 года 11 месяцев назад Просмотрен 51k раза

  10. Java printing a String containing an integer - Stack Overflow

    String concatination in java works this way: if the first operand is of type String and you use + operator, it concatinates the next operand and the result would be a String.