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
Get step-by-step solutions from verified subject matter experts
