Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
776 B
6
Indexable
Never
import java.util.Scanner;

public class Raine2 {
    public static void main(String[] args) {
       
        String correctUsername = "wuhluigi";
        String correctPassword = "passwordnishekinah";
        
       
        Scanner scanner = new Scanner(System.in);
        
       
        System.out.print("Enter username: ");
        String username = scanner.nextLine();
        
        System.out.print("Enter password: ");
        String password = scanner.nextLine();
        
      
        if (username.equals(correctUsername) && password.equals(correctPassword)) {
            System.out.println("Login successful!");
        } else {
            System.out.println("Incorrect username or password.");
        }
        
        
        scanner.close();
    }
}