我試着去找出正確的地圖或列表使用...隨機選擇Java值映射
我需要將值添加到列表或地圖和檢索,然後randomly..ie
喜歡的東西
Map<String, String>map
index 1 of map (or list) = "John", "John is from some country"
index 2 of map (or list) = "Mary", "Mary is from some country"
index 3 of map (or list) = "Paul", "Paul is from some country"
然後傳遞索引變量的值...
爲指數1
結果String name = "John"
String from = "John is from some country"
任何想法歡迎...