Advertisement
Guest User

Untitled

a guest
Jul 12th, 2021
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. public  static  boolean StringTest(String str){
  2.  
  3.     if(str.equals("CROHERZE")|| str.equals("croherze")){
  4.         return  true;
  5.     }
  6.     return false;
  7. }
  8.  
  9.  
  10.  
  11.     public static void main(String[] args) {
  12.  
  13.      String str;
  14.      Scanner scan = new Scanner(System.in);
  15.         System.out.println("Unesite rijec");
  16.         str=scan.next();
  17.  
  18.         String result = StringTest(str)?"TACAN ODGOVOR":"Odgovor nije tacan, pokusajte ponovo";
  19.  
  20.         System.out.println(result);
  21.  
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement