We would like to know how to filter text file line by line and output.
/*from w w w. ja va 2 s . c o m*/ import java.nio.file.Files; import java.nio.file.Paths; public class Main { public static void main(String[] args) throws Exception{ Files .lines(Paths.get("c:/Java_Dev", "run.bat")) .filter(line -> line.startsWith("A")) .forEach(System.out::println); } }