I need a little help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

16th Aug 2020, 3:29 PM
stephen haokip
stephen haokip - avatar
5 Answers
+ 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?
16th Aug 2020, 3:34 PM
Jayakrishna 🇮🇳
+ 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.]
16th Aug 2020, 3:50 PM
Jayakrishna 🇮🇳
+ 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());
16th Aug 2020, 6:01 PM
Jayakrishna 🇮🇳
0
Jayakrishna how shall i output all the contents of hashmap map
16th Aug 2020, 3:38 PM
stephen haokip
stephen haokip - avatar
0
Can u giv me ur whatsapp no... i m from india... u can trust me... only for knowledge sharing purpose
16th Aug 2020, 3:53 PM
stephen haokip
stephen haokip - avatar