how to declare object variable name in loop
- by user3717895
public class Node{
Node p,l,r;
int height;
String s;
{
/** class body**/
}
}
String[] S=new String[5000];
int i=0;
while (i<5000){
Node x=new Node();
x=S[i];
}
I want to make 5000 Node object.
above code assign same variable name x every time but i want different variable name .
then how to declare 5000 class variable name without declaring it manually.
is there something by which i can create 5000 Node class object with ease.