I'm having a problem using HashMap
. I have test.txt with this data:
[Computers]
Keyboard=10
Mouse=5
[Cars]
Lamborghini=6
BMW=3
where the [Computers] & [Cars] are Category, Keyboard, Mouse, Lamborghini and BMW are descriptors, and 10, 5, 6, 3 are values for each descriptor.
How can I make a HashMap
that can System.out.println("Category" + "descriptor" + value)
on console or in JTextArea
when clicking a button?