0
I need a little help
Given the code below 1. How shall i access the createMap method(i want to output the contents of the hashmap map); 2. How shall i access getSameFirstNameCount method(i want to output the value fcount variable); 3. How shall i access getSameLastNameCount method(i want to output the value of lcount variable); https://code.sololearn.com/c1STn56N8NI9/?ref=app
5 Réponses
+ 2
This is an example :
public static void main(String[] args){
HashMap m = createMap();
System.out.println(getSameFirstNameCount(m,"haokip"));
System.out.println(getSameLastNameCount(m,"stephen1"));
}
Edit
You asked same question yesterday.. Is that not helped you..
In what else way you need?
+ 1
Use an iterator stephen haokip
Or
Just add this to main
System.out.println(m);
[ My DM not working, so I can't reply there.. Not activated mail.]
+ 1
stephen haokip sry, i don't have any other account.. I don't used till now any WhatsApp, Facebook, or any.. Truly its true..
For anything you can DM me, I can read if am not last notifications, it's not saving.. Or leave comments in any others sources like codes..
For above, for readability, write like :
HashMap<String,String> m = createMap();
for(HashMap.Entry<String, String> pair:m.entrySet())
System.out.println(pair.getKey() + " : "+pair.getValue());
0
Jayakrishna how shall i output all the contents of hashmap map
0
Can u giv me ur whatsapp no... i m from india... u can trust me... only for knowledge sharing purpose