原创 java中的compareto方法的詳細介紹

  java中的compareto方法,返回參與比較的前後兩個字符串的asc碼的差值,看下面一組代碼 String a="a",b="b"; System.out.println(a.compareto.b); 則輸出-1; 若a="a"