Support Forums
Homework help - URGENT! - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Java Programming (https://www.supportforums.net/forumdisplay.php?fid=22)
+---- Thread: Homework help - URGENT! (/showthread.php?tid=16426)



Homework help - URGENT! - Twicks - 02-24-2011

Hey guys! I'm doing a timed worksheet for my Java class. I need help with this question:
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?



RE: Homework help - URGENT! - Untouch - 02-24-2011

I'm not sure, I keep changing my mind but I think either method 1 or 3 would have to be included.
I don't think method 2 by itself if at all with be right.


RE: Homework help - URGENT! - Twicks - 02-24-2011

The answer is method 3 Big Grin thanks for your help.

/close