I’m new to Java. I’m wondering what will be the best option to store 2D array with different type of data.
It will be table of countries, each has capital and is in cotinent. Then I have to store it this way:
ContinentID | Country name | Capital
What to choose?
You might want to consider making a
Countryclass to hold this data, and then maintaining a list/array of instances of this class.You would then have something along the lines of