+ 2

String and int together in arrays—how?

I have an assignment that needs to display the sample COVID cases in Philippines, Indonesia and China, with their central cities on Manila, Jakarta and Beijing respectively. On top of that, those countries have 2000, 5000 and 10000 cases respectively (sample cases). I need to use the multidimensional array, but I'm nowhere from being able to run one without fail. How can I put strings and int together in arrays?

15th Dec 2020, 2:38 AM
Julie Mae Javier
Julie Mae Javier - avatar
6 Antworten
+ 5
Can you use a hashmap instead?
15th Dec 2020, 4:01 AM
Sonic
Sonic - avatar
+ 2
Julie Mae Javier In which language are you trying to do that? https://www.sololearn.com/post/75089/?ref=app
15th Dec 2020, 3:15 AM
Krish
Krish - avatar
+ 2
You can use dictionaries in python
15th Dec 2020, 2:51 PM
Swaya
+ 1
Krish , Java. I'm using Java
15th Dec 2020, 2:45 PM
Julie Mae Javier
Julie Mae Javier - avatar
+ 1
Sonic , hashmap? How?
15th Dec 2020, 2:45 PM
Julie Mae Javier
Julie Mae Javier - avatar
+ 1
Swaya , hello. But I am using Java as per learning competency given by the Department of Education (here in my country)
15th Dec 2020, 2:52 PM
Julie Mae Javier
Julie Mae Javier - avatar