5,160 results
Open links in new tab
  1. Java String compareTo () Method - W3Schools

    Definition and Usage The compareTo () method compares two strings lexicographically. The comparison is based on the Unicode …

  2. Java String compareTo() Method with Examples - GeeksforGeeks

    Jan 20, 2025 · The String class of Java comprises a lot of methods to execute various operations on strings and we will be focusing …

  3. Comparable (Java Platform SE 8 ) - Oracle

    Virtually all Java core classes that implement Comparable have natural orderings that are consistent with equals. One exception is …

  4. Guide to Implementing the compareTo Method - Baeldung

    May 29, 2025 · Learn about how to implement the compareTo method using core Java.

  5. Comparable (Java SE 17 & JDK 17) - Oracle

    Virtually all Java core classes that implement Comparable have natural orderings that are consistent with equals. One exception is …

  6. Java | ==, equals (), compareTo (), equalsIgnoreCase () and compare ()

    Jan 22, 2026 · In Java, there are multiple ways to compare two String objects. Each method serves a different purpose and behaves …

  7. 【Java入門】compareToで大小を比較をする方法総まとめ(文字列/日 …

    May 6, 2024 · この記事では「 【Java入門】compareToで大小を比較をする方法総まとめ(文字列/日付) 」について、誰でも理解で …

  8. Java - String compareTo () Method - Online Tutorials Library

    Syntax Here is the syntax of this method − int compareTo(Object o) Parameters Here is the detail of parameters − O − the Object to …

  9. Java - String compareTo () Method - Online Tutorials Library

    The Java String compareTo() method is used to compare two strings lexicographically. It returns an integer value, and the …

  10. Java String compareTo () - Programiz

    In this tutorial, we will learn about the Java String compareTo() method with the help of examples.