国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

java正則如何表示80-160的范圍?

網(wǎng)友解答: import java.util.Scanner;public class test {public static void main(String[] args) {Sca

網(wǎng)友解答:

import java.util.Scanner;

public class test {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.println("請輸入數(shù)據(jù):");

String in = sc.nextLine();

if(checkNum(in)){

System.out.println("輸入的數(shù)字為80-160!");

}

else{

System.out.println("輸入的數(shù)據(jù)不在范圍內(nèi)!");

}

sc.close();

}

public static boolean checkNum(String str){

return str.length() < 4 && str.matches("[8-9][0-9]|[1][0-5][0-9]|160");

}

}

標簽: