Jumat, 15 November 2013

Program Login pada JAVA

import java.util.*;
public class login {

    public static void main(String[] args) {
  
        Scanner input = new Scanner(System.in);
        String a,b;
  
        System.out.print("Masukan Username : ");
        a = input.nextLine();
  
        System.out.print("Masukan Password : ");
        b = input.nextLine();
        
        if (a.equals("widya") && b.equals("labsi"))
              System.out.println("\nAnda Berhasil Login");
        else
              System.out.println("\nAnda Gagal Login");   
  
        System.out.println("\n\n");              
    }
      
}

Tidak ada komentar:

Posting Komentar

Please Leave Your Comment :)