一道Java题,很急,谢谢!

来源:百度知道 编辑:UC知道 时间:2024/06/09 14:33:41
问题:
This method takes an array of strings and a probe string as its arguments and calls the checkForProbe method with the same arguments. If checkForProbe returns a value (without throwing an exception), this method returns that same value. If checkForProbe throws an IllegalArgumentException, this method catches the exception, appends "CAUGHT" to the message of that exception and then throws an IllegalArgumentException with the modified message. If checkForProbe throws any other kind of exception, this method catches the exception and returns false. In order to invoke checkForProbe, call the test.checkForProbe method.

The following is the method prototype for the method:
boolean handleSpecificExceptions(String[ ] inputStrings, String probe)
throws IllegalArgumentException

Please submit your code below.

我的code:

import java.security.InvalidParameterException;

class studentSubmission {
boolean

问题内容用英文..这挑战还不小呢
test是谁的对象 没有声明把;
而且最后的 return e.getClass().getName(); 这里return的e貌似也没有声明.
studentSubmission.java:8: ')' expected
test.checkForProbe(String[] inputStrings, String probe);
^
这个没找到错误的地方