martinvalchev

Equal Words

Oct 23rd, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class EqualWords {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         String word1 = scanner.nextLine();
  7.         String word2 = scanner.nextLine();
  8.  
  9.         word1 = word1.toLowerCase();
  10.         word2 = word2.toLowerCase();
  11.  
  12.         if ( word1.equals(word2)) {
  13.             System.out.println("yes");
  14.         } else {
  15.             System.out.println("no");
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment