About 52 results
Open links in new tab
  1. How do I convert a String to an int in Java? - Stack Overflow

    (This treatment defaults a malformed number to 0, but you can do something else if you like.) Alternatively, you can use an Ints method from the Guava library, which in combination with Java 8's …

  2. 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 …

  3. ¿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 = …

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

    May 7, 2015 · 3 If you want to check if the string represents an integer that fits in an int type, I did a little modification to the jonas' answer, so that strings that represent integers bigger than …

  5. 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.

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

    Jun 23, 2009 · Note: Java 6u14 allows you to increase the size of your Integer pool with a command line option -Djava.lang.Integer.IntegerCache.high=1024 for example. Note 2: If you are reading raw data …

  7. Converter String para inteiro em Java

    Jan 30, 2015 · Como faço para capturar uma String do usuário através do Scanner e transformar em inteiro?

  8. 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.

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

    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 implementat...

  10. How to concatenate int values in java? - Stack Overflow

    Apr 20, 2010 · I have the following values: int a=1; int b=0; int c=2; int d=2; int e=1; How do i concatenate these values so that i end up with a String that is 10221; please note that multiplying a …