Advertisement
Guest User

Untitled

a guest
May 7th, 2016
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import java.util.*;
  2. public class nauka{
  3. public static void main(String[] args){
  4.  
  5. Scanner sk = new Scanner(System.in);
  6. String haslo,login;
  7.  
  8. System.out.println("podaj login");
  9. login = sk.nextLine();
  10.  
  11. System.out.println("podaj haslo");
  12. haslo = sk.nextLine();
  13.  
  14. if((login=="ja") && (haslo=="kaa"))
  15. {
  16. System.out.println(" prawidłowe dane! ");
  17.  
  18. }
  19.  
  20. else if ((login!="ja") ||(haslo!="kaa"))
  21. {
  22. System.out.println("nieprawidłowe dane! ");
  23.  
  24. }
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement