About 216,000 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, …

  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. Format an Integer using Java String Format - Stack Overflow

    I am wondering if it is possible, using the String.format method in Java, to give an integer preceding zeros? For example: 1 would become 001 2 would become 002 ... 11 would …

  4. Converting a string to an integer on Android - Stack Overflow

    5 You can use the following to parse a string to an integer: int value=Integer.parseInt (textView.getText ().toString ()); (1) input: 12 then it will work.. because textview has taken this …

  5. java - error: incompatible types: String cannot be converted to int ...

    response is an int and Scanner.nextLine() returns a String. How would you convert a line containing i.e. this line contains letters and 6 spaces to an int..?

  6. How to convert a Binary String to a base 10 integer in Java

    I have an array of Strings that represent Binary numbers (without leading zeroes) that I want to convert to their corresponding base 10 numbers. Consider: binary 1011 becomes integer 11 …

  7. What's the simplest way to print a Java array? - Stack Overflow

    Java 8 - Stream.collect (joining ()), Stream.forEach Below I try to list some of the other methods suggested, attempting to improve a little, with the most notable addition being the use of the …

  8. ¿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 5 meses Modificada hace 8 años y 5 meses Vista 216k veces

  9. java - How can I pad an integer with zeros on the left? - Stack …

    How do you left pad an int with zeros when converting to a String in java? I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).

  10. java - Converting String Array to an Integer Array - Stack Overflow

    I want to convert the string input to an integer array. so int[0] would be 12, int[1] would be 3, etc. Any tips and ideas? I was thinking of implementing if charat(i) == ',' get the previous number …