gpt4 book ai didi

java - [Ljava.lang.StackTraceElement; @ 19821f异常

转载 作者:行者123 更新时间:2023-12-01 04:10:24 25 4
gpt4 key购买 nike

我有以下问题

我在类中定义了Point []数组,例如

private Point[] dataPoints


课堂积分包括以下内容

public class Point {
public double x;
public double y;
public double z1;
public double z2;
public double z3;
public double z4;
public double z5;
public int index;

public Point() {
}

public Point(double x, double y,double z3,double z4, double z5, double z6, double z7, int index) {
this.x = x;
this.y = y;
this.z1= z3;
this.z2= z4;
this.z3= z5;
this.z4= z6;
this.z5= z7;
this.index = index;
}
}


当我从班级上课时

        dataPoints[pointIndex] = new Point(x,y,z3,z4,z5,z6,z7,pointIndex);


我从catch Exception语句中收到以下错误

[Ljava.lang.StackTraceElement;@19821f 

最佳答案

使用Try / catch并通过e.getStackTrace()捕获该异常。

关于java - [Ljava.lang.StackTraceElement; @ 19821f异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21099569/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com