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.