How can I use StringTokenizer to count how many times a number is present in a String if the numbers are separated with "_"? The String has to be entered through the command line.
For example if user enters:
1_3_34_12_1_2_34
the output will be
1_2, 3_1, 34_2, 2_1, 12_1
Here is an example of what you can do
prints
Hint: The order suggests you should use a
LinkedHashMap<String, Integer>