Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileReader fread = new FileReader(path);
- Scanner fscan = new Scanner(fread);
- isCorrect = true;
- deleteIndex = 0;
- while(fscan.hasNextLine() && isCorrect) {
- try {
- deleteIndex = Integer.parseInt(fscan.nextLine());
- } catch (Exception e) {
- isCorrect = false;
- }
- if ((((deleteIndex < 1) || (deleteIndex > maxIndex+1))) && isCorrect)
- isCorrect = false;
- }
- fread.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement