Question: Which throws clause specifies the minimum required exception types for the filterTimeData method? public static double [ ] filterData ( Scanner scnr , int numValues,
Which throws clause specifies the minimum required exception types for the filterTimeData method?
public static double filterDataScanner scnr int numValues, double lowThreshold, double highThreshold throws Exception
double inputVal;
double resultArray new doublenumValues;
for int i ; i numValues; i
inputVal scnrnextDouble;
if inputVal
throw new ExceptionInvalid negative time";
if inputVal lowThreshold && inputVal highThreshold
resultArrayi inputVal;
return resultArray;
public static double filterTimeDataString fileName, double lowThreshold, double highThreshold
FileInputStream inStream new FileInputStreamfileName;
Scanner fileScnr new ScannerinStream;
int numValues fileScnr.nextInt;
return filterDatafileScnr numValues, lowThreshold, highThreshold;
Question options:
throws FileNotFoundException, Exception
throws Exception, InputMismatchException
throws Exception
throws FileNotFoundException
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
