📜  string compareto vs equals java代码示例

📅  最后修改于: 2022-03-11 14:52:12.213000             🧑  作者: Mango

代码示例1
compareTo() when you need to know the difference in length between strings 
that start with the same sequence of characters.
  
  System.out.println("sumit".compareTo("timus"));//-1