I need something like a 3-dimension (like a list or a map), which I fill with 2 Strings and an Integer within a loop. But, unfortunately I don’t know which data structure to use and how.
// something like a 3-dimensional myData
for (int i = 0; i < 10; i++) {
myData.add("abc", "def", 123);
}
Create an object that encapsulates the three together and add them to an array or List:
If you want to insert into a database, write a DAO class:
Implement as needed using JDBC.