import java.util.Scanner; public class Program { public static void main(String[] args) { Plans MyPlan = new Plans(); while (true){ System.out.println("Введите команду:"); Scanner scanner = new Scanner(System.in); String com = scanner.nextLine(); switch (com){ case "#write": System.out.println("Введите ваши планы на сегодня: "); String write = scanner.nextLine(); String[] words = write.split(" "); if (!MyPlan.Write(words)){ System.out.println("Строка пустая"); } break; case "#read": MyPlan.Read(); break; default: throw new IllegalStateException("Unexpected value: " + com); } } } }