I am a rookie in Java Programming. I am clearing all my concepts before making a step ahead. I was reading an array chapter which says the basic structure to create an array is:
Type[] var_name = new Type[limit];
I was going through some slides of opencourseware. In these slides, they inserted a class name into the type of the array. For example:
public class Baby {
Baby[] siblings;
}
Can someone explain me what is the difference between the basic array structure and the structure written inside class.
int,long, ...) or classes. One thing: you should not uselimit, butsize. An array does not "grow". If you create it (by callingnew Type[size]), it will allocate memore forsize-manyTypes.=and what's following it, or the fact that the class name is used? Or something else?