02-24-2011, 01:41 PM
Hey guys! I'm doing a timed worksheet for my Java class. I need help with this question:
I think the answer is method II only, because it's abstract.
What's the right answer?
Quote:Consider the following incomplete classes:
public abstract class MyClass
{
public void method1(int fred)
{
// implementation not shown
}
public abstract void method2(int barney);
}
public interface MyInterface
{
public void method3(int wilma);
}
Which of the following methods must be defined in a class that implements MyInterface?
I. method1
II. method2
III. method3
I only
II only
I and II only
III only
II and III only
I think the answer is method II only, because it's abstract.
What's the right answer?