Quantcast
Channel: OKWAVE 閲覧数の多い質問(Java/253)【本日】
Viewing all articles
Browse latest Browse all 68675

HashMapについて

$
0
0
java初心者です。 HashMap oya= new HashMap(); HashMap child=null; child = new HashMap(); child.put("test1",Object1); child.put("test2",Object2); oya.put("Oya1",child); child = new HashMap(); child.put("test3",Object3); child.put("test4",Object4); child = new HashMap(); oya.put("Oya2",child); 上記のように値をセットした状態で ループの中でtest1の値を比較したいのです。 たとえば下記みたいに下記のやり方では出来なのは分かっています 値の比較の仕方を教えてください。 for(int i=0;oya.size();i++){ if(test1.equals("aaaa")){ bbb = "kkk"; break; } } よろしくお願いします。

Viewing all articles
Browse latest Browse all 68675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>