Question: 16. The method below is designed to print the smaller of two values received as arguments Select the correct expression to complete the method. public


16. The method below is designed to print the smaller of two values received as arguments Select the correct expression to complete the method. public void show Smaller (Comparable value1, Comparable value2) if System. out.println (value1 is smaller 8e System. out.println (value2 is smaller a) value1 value2 b value1 .compareTo (value2) o cO value1 .comparero (value2) o d value1.compareTo (value2) o 17. Which of the following is the correct syntax for creating a File object? a File in File File ("input.txt b File in File new File ("input.txt c File inFile File ope ("input.txt n d Fil in File new Fil ope ("input.txt n 18. Insert the missing code in the following code fragment. This code is intended to open a file and handle the situation where the file cannot be found. try String filename Scanner in new Scanner (new File (filename exception printStackTrace a catch (IOException exception) b catch (new exception (IOException) c) catch (IllegalArgumentException exception) d catch (IOException)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
