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

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

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

  4. Sort a single String in Java - Stack Overflow

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

  5. Returning String Methods in Java? - Stack Overflow

    Returning String Methods in Java? Asked 10 years, 11 months ago Modified 10 years, 11 months ago Viewed 103k times

  6. java - StringUtils.isBlank () vs String.isEmpty () - Stack Overflow

    May 2, 2014 · I am answering this because it's the top result in Google for "String isBlank () Method". If you are using Java 11 or above, you can use the String class isBlank () method.

  7. What is the difference between == and equals () in Java?

    Descendants classes, like String, can define what it means for two strings to be == by overriding the .Equals method. Java cannot do that. The Java String class (and no class in Java) has a …

  8. Java equivalent to C# extension methods - Stack Overflow

    Dec 6, 2010 · i.e. java.lang.String is a final class,so you can't extend it. Using static methods is a way but it shows code unreadable sometimes.I think C# left an age as a computer lang. …

  9. How do I invoke a Java method when given the method name as a …

    Object obj; String methodName = "getName"; Without knowing the class of obj, how can I call the method identified by methodName on it? The method being called has no parameters, and a …

  10. Remove part of string in Java - Stack Overflow

    If you have the string which you want to replace you can use the replace or replaceAll methods of the String class. If you are looking to replace a substring you can get the substring using the …