I am learning Java. I have been able to use the constructors Font(Font font) and Font(String name, int style, int size) to create an object of Font. However, I am having trouble using this constructor - Font(Map attributes).
Do I have to create a HashMap, insert values using "Object put(Object key, Object value)" method for each of the attributes of Font, or is there an alternative way of using this Font constructor in a simple way and in a single line?
An example would be even more helpful. Thanks!