About 138,000 results
Open links in new tab
  1. Reverse a string in Java - Stack Overflow

    Sep 10, 2017 · String testString = "Yashwanth@777"; // ~1 1⁄4→D800₁₆«2²⁰ Using Java 8 Stream API. First we convert String into stream by using method CharSequence.chars(), then we use …

  2. Returning String Methods in Java? - Stack Overflow

    Instance methods can not be called without an instance of the class they belong to where static methods can be called without an instance. So if you want to call your other methods inside …

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

    Apr 2, 2013 · ==tests object references, .equals() tests the string values. Sometimes it looks as if == compares values, because Java does some behind-the-scenes stuff to make sure identical …

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

    Nov 22, 2019 · 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 …

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

    Sep 1, 2010 · One of the cases where the override wouldn't be required is utility classes that group static utility methods, in the manner of java.util.Math. The case of override being not …

  6. Remove part of string in Java - Stack Overflow

    Aug 14, 2018 · A null source string will return null. An empty ("") source string will return the empty string. A null remove string will return the source string. An empty ("") remove string will return …

  7. Sort a single String in Java - Stack Overflow

    No there is no built-in String method. You can convert it to a char array, sort it using Arrays.sort and convert that back into a String.

  8. string - Ignoring upper case and lower case in Java - Stack Overflow

    Jul 20, 2017 · If you want to store everything in lowercase use String#toLowerCase, in uppercase use String#toUpperCase. Then when you have to actually treat it, you may use out of the bow …

  9. java - Reverse a string without using string functions - Stack …

    Aug 2, 2016 · It concept but it not invoke any String methods. import java.io.*; import java.util.*; public class Hello ...

  10. Java String import - Stack Overflow

    Oct 31, 2011 · Everything in the java.lang package is implicitly imported (including String) and you do not need to do so yourself. This is simply a feature of the Java language. ArrayList and …

Refresh