Question: What is wrong with this interface? public interface What { public abstract void some(String password) { System.out.println(Here is your password + password); } }

What is wrong with this interface?

public interface What { public abstract void some(String password) { System.out.println("Here is your password " + password); } }

a) A method in an interface should be declared abstract.

b) A method in an interface should be declared protected.

c) There should not be any method parameters.

d) There should not be a method body as shown.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!