Which is a more efficient way of accessing (key,value) pairs in terms of both memory and computation: reading from a properties file using properties.getProperty("key") or loading the entire properties file into a HashMap in the beginning of the program and then looking up for the key in HashMap?
Also, if only 1 of the values from the properties is used repeatedly, will it be better to store the value in a member variable and access it or look it up each time using properties.getProperty("key")?