[B]public class b[/B] { static a[] nodeobj=new a[3]; public static void main(String[] args) { nodeobj[0]=new a(123); nodeobj[1]=new a(44); nodeobj[2]=new a(3);} [B]public class a[/B] { int x; c[] datalist=new c[3]; public a(int a) { x=a; }} [B]public class c [/B]{ int t; public c(int y) { t=y; }
how to createunique refernces so that each nodeobj has its own datalist..
nodeobj[0] ---> datalist[o]
---> datalist[1]
---> datalist[2]
nodeobj[1] ---> datalist[o]
---> datalist[1]
---> datalist[2]