Tree Structure Implementation in Java.
706710Oct 16 2010 — edited Oct 16 20101>
How should i implement a "Tree Structure" in Java Based application.?How would i map the entries to the database table?how many tables will i require for this implementation.?
List records<String> = new ArrayList<String>();
records.add("null");
records.add("Product");
records.add("Category");
records.add("P1");
records.add("P2");
records.add("P3");
records.add("C1");
records.add("C2");
records.add("C3");
so how should i implement a Tree Structure for the above record set.
//P1,P2,P3 belong to Parent {Product}
//C1,C2,C3 belong to Parent {Category}
Sample code provided will be helpful