mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
11 lines
370 B
Java
11 lines
370 B
Java
// "Fix all ''compare()' method can be used to compare numbers' problems in file" "true"
|
|
public class Test {
|
|
public int test(String s1, String s2) {
|
|
int res = Integer.compare(s1.length(), s2.length());
|
|
if(res == 0) {
|
|
/*reverse order!*/
|
|
res = Character.compare(s2.charAt(0), s1.charAt(0));
|
|
}
|
|
return res;
|
|
}
|
|
} |