Working on a lab and don’t really understand how to go abutdoing the second method. I can’t use any java.util.Arrays methodsor the java stream API. I am assuming I can use the .clone() butdon’t know how would go about this.
Stat()—The default constructor for Stat. It should create adouble array having a single element 0.0.
Stat(double[] d)—Constructs a Stat object using the values heldin d. The constructor should create a double array of the samelength as d and holding copies of the values of d. A reference tothis new array should be assigned to data.
Solution