String ip="120.120.30.130";
boolean bz = false;
long t1 = System.currentTimeMillis();
System.out.println(t1);
String[] ips = ip.split("\\.");
if (ips.length >= 4) {
int ipe = Integer.valueOf(ips[3]);
String ipss = ips[0] + "." + ips[1] + "." + ips[2];
if (ipss.equals("120.120.30") && ipe > 129 && ipe < 255) {
bz = true;
}
} else {
bz = true;
}
System.out.println(bz);
System.out.println(System.currentTimeMillis()-t1);
long t2 = System.currentTimeMillis();
System.out.println(t2);
int sizes = ip.lastIndexOf(".");
String ipa = ip.substring(0,sizes);
String ipe = ip.substring(sizes+1,ip.length());
int intip = Integer.valueOf(ipe);
if(ipa.equals("120.120.30")&&intip >129 &&intip <225){
bz=true;
}else{
bz=false;
}
System.out.println(System.currentTimeMillis()-t2);
boolean bz = false;
long t1 = System.currentTimeMillis();
System.out.println(t1);
String[] ips = ip.split("\\.");
if (ips.length >= 4) {
int ipe = Integer.valueOf(ips[3]);
String ipss = ips[0] + "." + ips[1] + "." + ips[2];
if (ipss.equals("120.120.30") && ipe > 129 && ipe < 255) {
bz = true;
}
} else {
bz = true;
}
System.out.println(bz);
System.out.println(System.currentTimeMillis()-t1);
long t2 = System.currentTimeMillis();
System.out.println(t2);
int sizes = ip.lastIndexOf(".");
String ipa = ip.substring(0,sizes);
String ipe = ip.substring(sizes+1,ip.length());
int intip = Integer.valueOf(ipe);
if(ipa.equals("120.120.30")&&intip >129 &&intip <225){
bz=true;
}else{
bz=false;
}
System.out.println(System.currentTimeMillis()-t2);