Hello ,i'm a beginner in coding.
So i wrote a little script to connect to something ( in my imagination ) . But i wanted to created two set , one for Usernames , and the other for passwords , but i want to like , link every username to a specefic password.
Here is the code i wrote ,i want you guys , if it is possible to check if there is a way to match a username with a password without using Sql tables or something in that kind.
import java.util.*;
public class sum{
	public static Scanner info = new Scanner(System.in);
	public static boolean checking = false;
	public static String getUserName(String username) {
		return username;
	public static String getPassword(String password) {
		return password;
	private static void recoveryUserName() {
		String usernm = getUserName("Username");
		System.out.println("Your username is : " + usernm);

	private static  void recoveryPassword() {
		String passw = getPassword("Password");
		System.out.println("Your password is : " + passw);
	private static void createAccount() {
		String name;
		String pass;
		Set<String> account = new LinkedHashSet<>();
	public static void main(String[]args) {

	do {
		System.out.println("Please enter Your Username:");
		String usernm = info.next();
		System.out.println("Please enter Your password");
		String passw = info.next();
		if (!usernm.equals(getUserName("Username")) || !passw.equals(getPassword("Password"))) {
			System.out.println("You entered false informations");
			System.out.println("Did you forget your username or password?");
			String recoveryInCase = info.next();
			else if(recoveryInCase.equals("password")){
				System.out.println("Where were you born? : ");
				int year = info.nextInt();
				}else {
					System.out.println("We were unable to recover your password. Sorry, try later");
			checking = false;
		}else {
			checking = true;
	}while(checking == false );