What will happen when we compile and run the printImportant() method below?

public int findLargest(int[] ages)
{
   // assume this method works and returns the largest age
}

public static int printImportant(String[] names, int[] ages)
{
    System.out.println("The first name in the list is: " + names[0]);
    int largestAge = findLargest(ages);
    System.out.println("The largest age is: " + largestAge);
}
An error would happen at compile-time becuase printImportant() calls a non-static method
  • printImportant() would produce a NullPointerException when trying to call findLargest(), because no object exists
  • printImportant() would print out the first value in the String array names and the largest value in the array
  • findLargest() would throw an exception because it is called from a static method

There are no hints for this question