62,614
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) {
String s1 = "1.0.1.8";
String s2 = "1.0.1.10";
s1 = s1.replaceAll("\\.", "");
s2 = s2.replaceAll("\\.", "");
int n1 =Integer.parseUnsignedInt(s1);
int n2 =Integer.parseUnsignedInt(s2);
boolean result = n2>n1;
System.out.println(result);
}