About Question enthuware.ocajp.i.v7.2.1162 :
Moderator: admin
About Question enthuware.ocajp.i.v7.2.1162 :
Can the method "TestClass()" be final if the class is abstract??
if the class is extended, the method couldn't be extended, isn't??
Thanks in advance.
if the class is extended, the method couldn't be extended, isn't??
Thanks in advance.
-
- Site Admin
- Posts: 10067
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1162 :
It is not necessary for an abstract class to have all its methods extensible. So it does make sense even if an abstract class has final methods.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
Re: About Question enthuware.ocajp.i.v7.2.1162 :
constructor's can't be final though can they?
-
- Site Admin
- Posts: 10067
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1162 :
Constructors are never inherited. So final doesn't really apply to them. But yes, you can't even put final keyword for a constructor.Guest wrote:constructor's can't be final though can they?
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Sat Jul 13, 2013 2:49 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1162 :
What irritates me here is that the answer 4 says "constructor", but there is no constructor. Final void TestClass has a return type. I thought there is no return type allowed for constructors? Or did I get something wrong here?
-
- Site Admin
- Posts: 10067
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1162 :
Did you read the explanation? That is exactly why this is a wrong option!Antenne88 wrote:What irritates me here is that the answer 4 says "constructor", but there is no constructor. Final void TestClass has a return type. I thought there is no return type allowed for constructors? Or did I get something wrong here?
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Sat Jul 13, 2013 2:49 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1162 :
Thanks, guess I have to get used to the way these questions are constructed. I thought the modifiers synchronized, transient (native and volatile) were not on the 803 exam? Btw what means HTH? I really enjoy studying with your program - it's great!
-
- Site Admin
- Posts: 10067
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1162 :
These modifiers are not directly on the exam but covered in variable declaration. You should at least be aware of what they do.
Hope This Helps
Hope This Helps
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 223 guests