galinyotsev123

ProgBasics03Conditional-Statements-P07EqualWords

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