How do I read input line by line in Java? I searched and so far I have this:
import java.util.Scanner; public class MatrixReader { public static void main(S
Try using hasnextLine() method.
hasnextLine()
while (input.hasnextLine()){ System.out.print(input.nextLine()); }