Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

simple login password and username java

import java.util.Scanner;

public class Sample {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter Username: ");
        String user = input.nextLine();
        System.out.print("Enter Password: ");
        String pass = input.nextLine();
        if (user.equalsIgnoreCase("jas") && pass.equals("1224")) {
            System.out.print("
Welcome! " + user);
        } else {
            System.out.print("You don't have access!");
        }
        input.close();
    }
}
 
PREVIOUS NEXT
Tagged: #simple #login #password #username #java
ADD COMMENT
Topic
Name
8+2 =