Guest User

Untitled

a guest
Nov 15th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class JavaConsoleLogin {
  4. public static void main(String[] args){
  5. Scanner input = new Scanner(System.in);
  6. System.out.print("Kullanıcı Adı: ");
  7. String username= input.nextLine();
  8. System.out.print("Şifre: ");
  9. String password= input.nextLine();
  10. System.out.println("Kullanıcı adı: " + username);
  11. System.out.println("Şifre: " + password);
  12. if (username.equals(username)){
  13. if (password.equals("asd123")){
  14. System.out.println("Doğru giriş yaptı...");
  15. }
  16. else{
  17. System.out.println("Şifre yanlış :(");
  18. }
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment