About Question enthuware.ocajp.i.v8.2.1283 :
Moderator: admin
-
- Posts: 35
- Joined: Sat Nov 25, 2017 4:13 pm
- Contact:
About Question enthuware.ocajp.i.v8.2.1283 :
The option 5 would have been valid even if we don't write throws Exception?
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1283 :
What happened when you tried it out?
-
- Posts: 19
- Joined: Mon Sep 16, 2024 1:49 am
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1283 :
The first option could have been true?
public void add();
because methods declared in an interface have implicit abstract declaration in it.
I think the question could have been more precise.
public void add();
because methods declared in an interface have implicit abstract declaration in it.
I think the question could have been more precise.
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1283 :
It is quite precise because the problem statement clearly says, "What is the correct declaration for an abstract method 'add' in a class...". So there is no possibility of an interface here.
Who is online
Users browsing this forum: witek_m and 10 guests