0

Hi there,

I have this kind of sample table.

Name    Math    Science English
-------------------------------
Ben     86      88      80
Peter   80      79      83
John    84      90      86

I want to save this result, dynamically, in a "table" in Java. I want it to have a sorting function. Some of my user will like to view this by Name/Math/Science/English in ascending/descending order.

Also, I want to dynamically add data into this "table". Let's say like...
add("Albert", 81, 83, 81) will have a result of...

Name    Math    Science English
-------------------------------
Ben     86      88      80
Peter   80      79      83
John    84      90      86
Albert  81      83      81

I've read about ArrayList, ResultSet, DataTable, and many others but I really don't have any idea what's the right thing to use here. I'm also new to Java so please go easy on me. Just tell me if I'm missing some information to my problem.

Thanks.

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Claude2005
0

Thanks for the link but I have to ask since I forgot to mention this.

Is this applicable for web applications (JSP)?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.