I have a Java hashmap, to which multiple variables were added(ex.):
class client {
public static int clientIdentifier;
public static String clientName;
public static String clientFamilyname;
public static String clientBirthdate;
}
Inside the main method:
client newclient = new client();
HashMap<Integer, String> clients = new HashMap<>();
clients.put(newclient.clientIdentifier,
newclient.clientName +
newclient.clientFamilyname +
newclient.clientBirthdate
Where new client.clientIdentifier is the key and newClient.clientName/Familyname/Birthdate are already defined. They belong to an object newclient, it belonging to the class client
Is there any way to get only the value clientName from that hashmap, to compare later?
Looking for something like:
String requiredName = clients.get(scannedID, newclient.clientName);
(I know that it is totally wrong, but just to have an idea)
Thank you very much!