I'm writing a simple GUI program where I have to input login and password for user and then check if he is in database (my Hashmap). That's where i have problem. I checked if login is correct by containsKey and checked for password by containsValue. The problem is, that if in example I have 2 users:
login: user1 password: example login: user2 password: programing
login: user1 password: example login: user2 password: programing If I will put login user1as user1 in my JTextFieldJTextField and password programing"programing", the program says, that it's correct.
That's where I have a problem. How to check forthe password for exact login, which is key?
Would be very thankfullthankful for any clues or solutions :)