I have a ArrayList of objects. Suppose, the object is a class something like this...
public class User {
String userId;
String name;
String account_created;
String date_Of_Birth;
//setters and getters
}
Iam inserting the data into the list from an external source (like database)
List<User> usersList = new UserManager().totalUsersList();
I created a new Array for columns
String[] columns = new String[] { "Id", "Name", "Account Created", "Date of Birth" };
Iam want to send the List data into multidimensional array. Something like ...
String[][] usersData = new String[usersList.size()][4];
for (User user : usersList) {
//usersData = usersData + {"","","",""} ; --> Need to add data into Array while iterating the over the list
}
How can i send data from List into the array : usersData
Iam sending the data into an array for displaying in a JTable(Swing).
Any Suggestions ...... ???