About 50 results
Open links in new tab
  1. How do I compare strings in Java? - Stack Overflow

    Apr 2, 2013 · The Java String class actually overrides the default equals() implementation in the Object class – and it overrides the method so that it checks only the values of the strings, not their locations …

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

    Sep 1, 2010 · The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal …

  3. How do I split a string in Java? - Stack Overflow

    Nov 20, 2016 · The String#split () method makes use of Pattern.split, and now it will remove empty strings at the start of the result array. Notice this change in documentation for Java 8:

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

  5. android - Unable to find method ''java.lang.String com.squareup ...

    Dec 17, 2025 · The Gradle script syncs correctly, but when I try to run the application I get the following error: Unable to find method ''java.lang.String com.squareup.javapoet.ClassName.canonicalName()'' …

  6. java - can't find main (String []) method in class - Stack Overflow

    Aug 14, 2019 · The main method exists in TcsDigital but seems you are running Coor class. What is the name of the .java file you saved? Do you have an individual .java file for each class?

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

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

  9. What is the purpose of the expression "new String(...)" in Java?

    Regardless of the answers on how/why new String(String) should be used, s = new String("Hello World") where the parameter is a literal does not make sense in Java, and probably never will.

  10. Reverse a string in Java - Stack Overflow

    I have "Hello World" kept in a String variable named hi. I need to print it, but reversed. How can I do this? I understand there is some kind of a function already built-in into Java that does th...