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

  3. Returning String Methods in Java? - Stack Overflow

    I'm in a beginning programming class, and a lot of this had made sense to me up until this point, where we've started working with methods and I'm not entirely sure I understand the "static," "void...

  4. 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?

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

  6. 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 String …

  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. How to override toString() properly in Java? - Stack Overflow

    May 24, 2012 · Java toString () method If you want to represent any object as a string, toString () method comes into existence. The toString () method returns the string representation of the object. …

  9. 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?

  10. java - Count words in a string method? - Stack Overflow

    May 3, 2011 · I was wondering how I would write a method to count the number of words in a java string only by using string methods like charAt, length, or substring. Loops and if statements are okay! I really