Hi all.
I kindly want your help here.
As a newbie in OOP, I am trying to understand how the language reacts.
What I want to do is initialize an object array of another class.
What I am trying to say is :
Class xx
After a 5hour search and total confusion,the only way this works is this :
Is this the only way ? And how can I print the objects when I need them in my Main class ?? Thank you in advance.
I kindly want your help here.
As a newbie in OOP, I am trying to understand how the language reacts.
What I want to do is initialize an object array of another class.
What I am trying to say is :
Class xx
Code:
foo[] foox = new foo[9]
foox[0] = new foo("value here","value here");
//Class foo has the variables . IE string name; - string something;
Code:
foo[] foox;
public xx()
{
foox = new foo[9];
foox[0] = new foo("value","value");
foox[1] = new foo(etc etc);
//etc
}