小编Viv*_*one的帖子

获取ArrayIndexOutOfBound:1个异常

我试图解析一个字符串并将其存储在字符串数组中.当我试图解析字符串"log1"时,我能够解析它.但是当我解析字符串"log2"时,得到这个"线程中的异常"主"java.lang.ArrayIndexOutOfBoundsException:1".

运行以下代码:

import static java.lang.System.*;

public class test{


    static String[] final_log = new String[13];
    static String audit = null;
    static String[] auditArray = null;
    static int j=0;

    public static void main(String[] args) {



    String[] columnlist = {"UserID","ClientAddress","Severity","EventType","ResourceAccessed","EventStatus","CompulsoryEvent","AuditCategory","ComponentID","AuditDetails","App ID","Cluster ID","Node ID"};

    String log1 = "UserID : ccmadministrator  ClientAddress : 172.30.235.29  Severity : 5  EventType : GeneralConfigurationUpdate  ResourceAccessed: CUCMAdmin  EventStatus : Success  CompulsoryEvent : No  AuditCategory : AdministrativeEvent  ComponentID : Cisco CUCM Administration  AuditDetails :  record in table batjob with key field …
Run Code Online (Sandbox Code Playgroud)

java indexoutofboundsexception

3
推荐指数
1
解决办法
318
查看次数

标签 统计

indexoutofboundsexception ×1

java ×1