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

    Returns a String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and radix 10 were given as …

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

    Integer x = Integer.valueOf(str); // or int y = Integer.parseInt(str); There is a slight difference between these methods: valueOf returns a new or cached instance of java.lang.Integer parseInt returns …

  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 - Integer to String conversion methods - Stack Overflow

    Sep 27, 2010 · What are the alternative methods for converting and integer to a string?

  5. integer - Get int from String, also containing letters, in Java - Stack ...

    Feb 26, 2010 · How can I get the int value from a string such as 423e - i.e. a string that contains a number but also maybe a letter? Integer.parseInt() fails since the string must be entirely a number.

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

    Para hacer la siguiente operación necesitaremos hacer uso de la clase Integer y de su método "parseInt" de la siguiente manera: String numCadena = "1"; int numEntero = …

  7. Most efficient way of converting String to Integer in java

    Jun 25, 2009 · There are many ways of converting a String to an Integer object. Which is the most efficient among the below: Integer.valueOf() Integer.parseInt() …

  8. How can I check if a value is of type Integer? - Stack Overflow

    Sep 24, 2012 · To check if a String contains digit character which represent an integer, you can use Integer.parseInt(). To check if a double contains a value which can be an integer, you can use …

  9. What's the best way to check if a String represents an integer in Java ...

    May 7, 2015 · The method should check, it the value represented by the String is within the Integer range. If you supply the method with an argument, which is even larger than Long, then it certainly …

  10. java - Extract Integer Part in String - Stack Overflow

    What is the best way to extract the integer part of a string like Hello123 How do you get the 123 part. You can sort of hack it using Java's Scanner, is there a better way?