import java.util.Scanner; public class People { public static int persons; public static void howMany(){ System.out.println("Ðа ÑколÑÐºÐ¸Ñ Ñеловек Ð½ÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ ÑазделиÑÑ ÑÑÑÑ?"); while(true) { Scanner scanner = new Scanner(System.in); boolean hasInt = scanner.hasNextInt(); if(hasInt) { int hasPersons = scanner.nextInt(); if (hasPersons > 1) { persons = hasPersons; return; } else { System.out.println("ÐÑибка! ÐведиÑе коÑÑекÑное ÑиÑло."); } } else { System.out.println("ÐÑибка! ÐведиÑе коÑÑекÑное ÑиÑло."); } } } }