Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tree Structure Implementation in Java.

706710Oct 16 2010 — edited Oct 16 2010
1>
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2010
Added on Oct 16 2010
6 comments
324 views