I´m sorry but I can´t think of other titles for my question. I´m writing a programm in Java, with a big amount of diffrent variables. So I decided to use HashMaps (or in generel maps). But I dont know that much about complex maps in Java. I only know "HashMaps" and how to use them. Here are 2 diffrent HashMaps which I thougth I can use :
public class Storage {
public static HashMap<String, Boolean> user = new HashMap<>();
public static HashMap<Integer, Double> money = new HashMap<>();
}
So, now it´s getting a bit confusing. So, as you can see, there are 2 HashMaps. In the first HashMap is the Value to every key true or false.
public class test {
String s = "Tester";
public void on() {
if(Storage.user(s) == true) {
//That part will be my question
}
}
}
So, if the value of the given String is true, there should be an extra HashMap, like in the Storage class. But I mean, there should be to every String (if it´s true) a HashMap and they shouldnt share one Map. As I said, I dont know that much about maps and maybe HashMaps are completely false. If so, I´m sorry. Hopefully you get my problem and know a suitable solution