多选题

以下这段代码的圈复杂度为()    代码段如下:...

发布于 2022-03-03 17:27:43

以下这段代码的圈复杂度为()

   代码段如下:

     public String case2(int index, String string) {

       String returnString = null

       if (index < 0) {

           throw new IndexOutOfBoundsException("exception <0 ")

       }

       if (index == 1) {

           if (string.length() < 2) {

              return string

           }

           returnString = "returnString1"

       } else if (index == 2) {

           if (string.length() < 5) {

              return string

           }

           returnString = "returnString2"

       } else {

           throw new IndexOutOfBoundsException("exception >2 ")

       }

       return returnString

    }


登录后免费查看答案
关注者
0
被浏览
32
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看