Page 1 of 1

About Question enthuware.ocajp.i.v8.2.1493 :

Posted: Wed Aug 09, 2017 6:08 am
by Sergey
The problem with the code is that since Foo extends FooBase, Foo gets the static method bar() from FooBar(FooBase) in its scope and since Foo also says it implements Bar interface, it needs to have an instance method bar() with the same signature.
misspell?

Re: About Question enthuware.ocajp.i.v8.2.1493 :

Posted: Thu Aug 10, 2017 12:57 am
by admin
Fixed.
thank you for your feedback!

Re: About Question enthuware.ocajp.i.v8.2.1493 :

Posted: Sat Aug 26, 2017 2:23 am
by shambhavi
this might be silly but just making a mention :

first option has : Add this method in class Foo - public void bar(){ } ;
why is the semicolon there at the end ?

even without ; it will be a wrong option only. but just thought of mentioning.

Re: About Question enthuware.ocajp.i.v8.2.1493 :

Posted: Sat Aug 26, 2017 6:05 am
by admin
Extra semicolon is not a problem. It is ignored by the compiler.