H
hyena
hi,
Just want to know how to initialize all the elements using construction
function in an array when I declare it.
I defined a class like
class A {
A(parameters....){
//do something here
}
}
in another class, I declare
....
A[] test = new A[2];
I want to pass some parameter at the same time, but i have no idea of where
shall i initialize the elements in the array. Any tips?
thanks in advance!
Sun
Just want to know how to initialize all the elements using construction
function in an array when I declare it.
I defined a class like
class A {
A(parameters....){
//do something here
}
}
in another class, I declare
....
A[] test = new A[2];
I want to pass some parameter at the same time, but i have no idea of where
shall i initialize the elements in the array. Any tips?
thanks in advance!
Sun