About 50 results
Open links in new tab
  1. Difference between String trim() and strip() methods

    The methods that only accept a char value cannot support supplementary characters. ... The methods that accept an int value support all Unicode characters, including supplementary characters. …

  2. Sort a single String in Java - Stack Overflow

    Mar 3, 2009 · Is there a native way to sort a String by its contents in java? E.g. String s = "edcba" -> "abcde"

  3. Returning String Methods in Java? - Stack Overflow

    Returning String Methods in Java? Asked 11 years, 1 month ago Modified 11 years, 1 month ago Viewed 104k times

  4. How do I compare strings in Java? - Stack Overflow

    Apr 2, 2013 · Other Methods To Consider String.equalsIgnoreCase () value equality that ignores case. Beware, however, that this method can have unexpected results in various locale-related cases, see …

  5. Strip Leading and Trailing Spaces From Java String

    Jul 11, 2011 · 5 With Java-11 and above, you can make use of the String.strip API to return a string whose value is this string, with all leading and trailing whitespace removed. The javadoc for the same …

  6. java - Difference between String replace () and replaceAll () - Stack ...

    May 31, 2012 · What's the difference between java.lang.String 's replace() and replaceAll() methods, other than the latter uses regex? For simple substitutions like, replace . with /, is there any difference?

  7. Can I add new methods to the String class in Java?

    If you edit the String.java file located in src.zip, and then rebuild the rt.jar, the String class will have more methods added by you. The downside is that that code will only work on your computer, or if you …

  8. java - Reverse a string without using string functions - Stack Overflow

    Aug 2, 2016 · Closed 12 years ago. How to write a java program to reverse a string without using string functions?

  9. java - What is the "String [] args" parameter in the main method ...

    May 21, 2009 · That String[] args part may become optional in future versions of Java. Work is underway to allow for simplified declaration of main method. See JEP 463: Implicitly Declared …

  10. How to use the toString method in Java? - Stack Overflow

    Sep 1, 2010 · Can anybody explain to me the concept of the toString() method, defined in the Object class? How is it used, and what is its purpose?