考试
1970-01-01 08:00:00

根据提示补全程序,使程序能够正确运行。public clas

题目描述

根据提示补全程序,使程序能够正确运行。public class Demo {   // 下面定义的方法验证IP地址的有效性。   public static boolean myMatches(String info) {      if (info != null && !info.isEmpty()) {        // 定义正则表达式        String aRegex = "^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\."         

答案解析

Pattern.compile(aRegex).matcher(info).matches()

加载中...
AI正在思考中,请稍候...