Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int sizeRowFile(String path) {
- int sizeI;
- boolean isIncorrect;
- System.out.println("Считывание размера строк......");
- sizeI = 0;
- isIncorrect = false;
- try (BufferedReader reader = new BufferedReader(new FileReader(path))) {
- sizeI = Integer.parseInt(reader.readLine());
- } catch (IOException ioException) {
- isIncorrect = true;
- }
- if ((sizeI < 1) || (isIncorrect = true)) {
- isIncorrect = true;
- System.err.println("Неверный ввод данных! Измените входные данные и перезапустите программу.");
- }
- System.out.println(sizeI);
- reader.close();
- return sizeI;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement