About Question enthuware.ocajp.i.v7.2.1385 :
Moderator: admin
-
- Posts: 29
- Joined: Fri Aug 08, 2014 11:22 am
- Contact:
About Question enthuware.ocajp.i.v7.2.1385 :
The type MySpecialException is not declared.
This code doesn't compile.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
MySpecialException cannot be resolved to a type
This code doesn't compile.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
MySpecialException cannot be resolved to a type
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1385 :
The question says, "(Assume that MySpecialException is an unchecked exception.)". So you need to assume that it exists.
To make it compile, you can add the following code:
class MySpecialException extends RuntimeException{}
To make it compile, you can add the following code:
class MySpecialException extends RuntimeException{}
-
- Posts: 29
- Joined: Fri Aug 08, 2014 11:22 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1385 :
It doesn't say this in the question. It's missing.
Shall I email a screenshot?
Shall I email a screenshot?
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1385 :
It was fixed only a few days ago. Please redownload the ets file from our website.
-
- Posts: 29
- Joined: Fri Aug 08, 2014 11:22 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1385 :
Got it thanks!
Was using the test software so much
that I never restarted it
so didn't catch the bank update notification
Thanks very much for taking the time to respond so quickly to each post
This product+forum is very helpful indeed
Cheers guys

that I never restarted it
so didn't catch the bank update notification
Thanks very much for taking the time to respond so quickly to each post
This product+forum is very helpful indeed
Cheers guys
-
- Posts: 2
- Joined: Sun Aug 02, 2015 3:54 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1385 :
Wouldn't this method require a throws statement to work? I had chose it would not compile based on that.
16. static void doSomethingElse() {
17. throw new MySpecialException("Sorry, can't do something else");
18. }
16. static void doSomethingElse() {
17. throw new MySpecialException("Sorry, can't do something else");
18. }
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1385 :
No, there is no need for a throws statement because the question says that MyException is an unchecked exception.
Who is online
Users browsing this forum: No registered users and 17 guests