Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void more(String path) throws Exception {
- File file = new File(path);
- File fileSameDir = new File(Dd+path);
- Scanner enter = new Scanner(System.in);
- if (fileSameDir.exists() ){
- Scanner sc = new Scanner(fileSameDir);
- while (sc.hasNextLine()) {
- System.out.print(sc.nextLine());
- String x = enter.nextLine();
- if (x=="")continue;
- }
- } else if (file.exists()){
- Scanner sc = new Scanner(file);
- while (sc.hasNextLine()){
- System.out.print(sc.nextLine());
- String x = enter.nextLine();
- if (x=="")continue;}
- }else {
- System.out.println(obj.printError("File not found"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement