Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import java.util.Scanner;
- public class test {
- public static void main(String[] args) {
- try {
- File b = new File("d.txt");
- Scanner sc1 = new
- Scanner(System.in);
- Scanner sc2 = new
- Scanner(b);
- String c, d;
- c = sc2.next();
- System.out.println(c);
- d = sc1.next();
- if (c.equals(d)) {
- System.out.println("Да!");
- } else {
- System.out.println("Нет");
- }
- sc2.close();
- } catch (Exception e) {
- System.out.println("Ошибка");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement