About 177,000 results
Open links in new tab
  1. java - How to convert a char to a String? - Stack Overflow

    Nov 17, 2011 · String(char[] value, boolean share) { // assert share : "unshared not supported"; this.value = value; } Source code from String.java in Java 8 source code. Hence …

  2. How to convert/parse from String to char in java?

    Oct 21, 2011 · If you want to parse a String to a char, whereas the String object represent more than one character, you just simply use the following expression: char c = (char) …

  3. Converting String to "Character" array in Java - Stack Overflow

    Apr 4, 2012 · I want to convert a String to an array of objects of Character class but I am unable to perform the conversion. I know that I can convert a String to an array of primitive datatype type …

  4. java - How to convert a char array back to a string ... - Stack …

    Apr 11, 2015 · Note however, that this is a very unusual situation: Because String is handled specially in Java, even "foo" is actually a String. So the need for splitting a String into …

  5. java - How to convert ASCII code (0-255) to its corresponding …

    Nov 2, 2016 · You're completely correct that something like Character.toString((char) i) is faster than String.valueOf(Character.toChars(i)). Running a quick benchmark of converting …

  6. string - Convert character to ASCII numeric value in java - Stack …

    May 9, 2013 · Java uses Unicode for string and char. A textual unit in Unicode is a grapheme, which is a base codepoint followed by zero or more combining codepoints. A codepoint, in …

  7. How to capitalize the first letter of a String in Java?

    Oct 11, 2010 · I am using Java to get a String input from the user. I am trying to make the first letter of this input capitalized. I tried this: String name; BufferedReader br = new …

  8. How to convert a String to a Java 8 Stream of Characters?

    Oct 12, 2014 · If you want char values, you can use the IntStream returned by String.chars() and cast the int values to char without loss of information. The other answers explained why …

  9. java - Most efficient way to make the first character of a String …

    Oct 29, 2010 · Despite a char oriented approach I would suggest a String oriented solution. String.toLowerCase is Locale specific, so I would take this issue into account.

  10. Converting Char Array to List in Java - Stack Overflow

    All Operations can be done in java 8 or above: To the Character array from a Given String. char[] characterArray = myString.toCharArray(); To get the Character List from given String. …

Refresh