How is it possible that class implements interface explicitly,
and web service can include class methods and methods of the interface?
I'm little bit confused...
Class must implement all inteface methods in this case as it is not abstract.
About Question enthuware.oce-ejbd.v6.2.522 :
Moderator: admin
-
- Posts: 21
- Joined: Mon Oct 24, 2016 6:55 am
- Contact:
-
- Site Admin
- Posts: 10152
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.522 :
Really sorry but I did not understand what you are asking. Yes, if a class lists an interface in its implements clause then it must either implement all the method of that interface or declare itself abstract. But I don't see this violated in this question.
If you like our products and services, please help us by posting your review here.
-
- Posts: 31
- Joined: Sun Oct 13, 2013 1:20 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.522 :
I agree with TS. Since all methods in interface should be implemented, the first option is as correct as the second.
-
- Site Admin
- Posts: 10152
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.522 :
1. Option 1 cannot be correct because you don't know whether getRate and getBalance are part of TellerRemote but these two methods will be exposed as well. Option 1 does not include these methods.
2. Even if you assume that TellerRemote includes those two methods, you have to select only 1 option. Option 2, which says, "Both - getRate() and getBalance() plus the methods declared in TellerRemote interface." is the better option and must be selected.
2. Even if you assume that TellerRemote includes those two methods, you have to select only 1 option. Option 2, which says, "Both - getRate() and getBalance() plus the methods declared in TellerRemote interface." is the better option and must be selected.
If you like our products and services, please help us by posting your review here.
-
- Posts: 31
- Joined: Sun Oct 13, 2013 1:20 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.522 :
Ah right, thanks!
Who is online
Users browsing this forum: No registered users and 2 guests