Write a java method named flipLines that accepts as its para
Write a java method named flipLines that accepts as its parameter a Scanner for an input file and that writes to the console the same file\'s contents with successive pairs of lines reversed in order.
Solution
public static void flipLines(Scanner input) {
while (input.hasNextLine()) {
String first = input.nextLine();
if (input.hasNextLine()) {
String second = input.nextLine();
System.out.println(second); }
System.out.println(first); } }

