Program skips everyother line, but not sure why [duplicate]
问题 This question already has answers here : Scanner skipping every second line from file [duplicate] (5 answers) Closed last year . My program prints all the data on the line, but only prints every other line. I know that it has something to do with the "nextLine", but I cannot find whats causing the problem. import java.io.*; import java.util.*; public class hw2 { public static void main (String[] args) throws Exception { String carrier; int flights; int lateflights; int ratio; String[][]