import java.util.Arrays;
class Partner {
/**
*
*/
private static final long serialVersionUID = 6844726196070246634L;
double[] time = new double[2];
double[] cost = new double[2];
double[] risk = new double[2];
String name = null;
public void setData(double[] time,double[] cost,double[] risk)
{
this.cost = Arrays.copyOf(cost,cost.length);
this.time = Arrays.copyOf(time,time.length);
this.risk = Arrays.copyOf(risk,risk.length);
}提示错误:The method copyOf(double[], int) is undefined for the type Arrays。谢谢大家来帮忙。
class Partner {
/**
*
*/
private static final long serialVersionUID = 6844726196070246634L;
double[] time = new double[2];
double[] cost = new double[2];
double[] risk = new double[2];
String name = null;
public void setData(double[] time,double[] cost,double[] risk)
{
this.cost = Arrays.copyOf(cost,cost.length);
this.time = Arrays.copyOf(time,time.length);
this.risk = Arrays.copyOf(risk,risk.length);
}提示错误:The method copyOf(double[], int) is undefined for the type Arrays。谢谢大家来帮忙。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货