Insert the missing code in the following code fragment. This…

Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt. public static void main(String[] args) __________________ { String inputFileName = “dataIn.txt”; File inputFile = new File(inputFileName); Scanner in = new Scanner(inputFile); . . . }

Consider the Counter class below. public class Counter { p…

Consider the Counter class below. public class Counter { public int count = 0; public int getCount() { return count; } public void increment() { count++; } } Using the class above and the variables declared below, what is the value of num1.equals(num2)? Counter num1 = new Counter(); Counter num2 = num1;

Insert the missing code in the following code fragment. This…

Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt. public static void main(String[] args) __________________ { String inputFileName = “dataIn.txt”; File inputFile = new File(inputFileName); Scanner in = new Scanner(inputFile); . . . }

Consider the method below, which prints the digits of an arb…

Consider the method below, which prints the digits of an arbitrary positive integer in reverse order, one digit per line.  The method should print the last digit first. Then, it should recursively print the integer obtained by removing the last digit. Select the statements that should be used to complete the method. public static void printReverse(int value) { if (value > 0) { _____________________ // print last digit _____________________ // recursive call to print value without last digit } }