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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Rinkesh
Posts: 35
Joined: Sat Nov 25, 2017 4:13 pm
Contact:

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

Post by Rinkesh »

The option 5 would have been valid even if we don't write throws Exception?

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

What happened when you tried it out?

nkaragulov
Posts: 19
Joined: Mon Sep 16, 2024 1:49 am
Contact:

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

Post by nkaragulov »

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.

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

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.

Post Reply

Who is online

Users browsing this forum: witek_m and 10 guests