JAVA simple HashMap (+Generics) syntax example

import java.util.*;

HashMap<String, Float> quality = new HashMap<>();
float price1 = 3.00F;
quality.put(“mint”, price1);
quality.get(“very fine”);
quality.clear();
quality.containsValue(price1);
quality.containsKey(“good”);

Leave a Reply

You must be logged in to post a comment.