Gives "non-static variable this cannot be referenced from a static context"
This is the code below for template class
public class BiHashMap<K1, K2, V>{
private final Map<K1, Map<K2, V>> mMap;
public BiHashMap() {
mMap = new HashMap<K1, Map<K2, V>>();
}
public V put(K1 key1, K2 key2, V value) {
Map<K2, V> map;
if (mMap.containsKey(key1)) {
map = mMap.get(key1);
} else {
map = new HashMap<K2, V>();
mMap.put(key1, map);
}
return map.put(key2, value);
}
}
public static void main(String[] args) {
BiHashMap<double,double,double> table1 = new BiHashMap<double,double,double>();
table1.put(0.375,1,350);
I tried making a new class for double but the error remained
public class dbble{
double number;
dbble(double x){
number=x;
}
}