SHARE
TWEET

text

a guest Apr 23rd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     private static Osoba Logowanie(List<Osoba> Person){
  2.  
  3.         System.out.println("Prosze podać swoj numer ID");
  4.         String IDosoba = sc.nextLine();
  5.  
  6.         System.out.println("Podaj haslo");
  7.         String Haslo = sn.nextLine();
  8.  
  9.         int tmp = 0;
  10.  
  11.         for(Osoba p : Person){
  12.  
  13.             if(IDosoba.equals(p.getIDosoba())){
  14.  
  15.                     if (Haslo.equals(p.getHaslo())) {
  16.                         System.out.println("Poprawnie Zalogowano");
  17.                         return p;
  18.                     }else{
  19.                         System.out.println("ZLE HASLO LUB NUMER ID");
  20.                     }
  21.  
  22.             }
  23.  
  24.            if(tmp==Person.size()-1){
  25.              System.out.println("ZLE HASLO LUB NUMER ID");
  26.            }
  27.            tmp++;
  28.         }
  29.  
  30.         return Logowanie(Person);
  31.  
  32.  
  33.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top