Question: I built a java file with a class that makes dynamics array the class works I am only including the constructor because I am not
I built a java file with a class that makes dynamics array the class works I am only including the constructor because I am not able to change anything in dynamic class.
public class dynamic{
private T[] ex;
dynamic(int size){
ex= (T[]) new Object[size];
}
}
In a different java file I have a class name example, I need to make temp a 2d dynamic array of dynamic arrays with rows 20 and columns 30.
public class example{
// I cannot change this
private final dynamic
public example(){
//i want to make a 2d array with row = 20, columns = 30 using temp how would I do that enter code in example()method only.
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
