Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to check if the file has remaining without reading from it java

Scanner scanner = new Scanner(new File("filename"));
while (scanner.hasNextLine()) {
   String line = scanner.nextLine();
   // process the line
}
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #check #file #remaining #reading #java
ADD COMMENT
Topic
Name
6+9 =