aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract Method" Watch "Abstract Method" New topic
Author

Abstract Method

Bin Zhao
Ranch Hand

Joined: Oct 04, 2000
Posts: 73
TRUE OR FALSE
An abstract method must be specified inside an abstract class only
in a mock exam,the anwser said it's true.
But I think a method declared in an interface is also an abstract
method,isn't it?
Am i wrong with this porblem?
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

you are correct the question was poorly worded.


SCJP
Visit my download page
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

The Mock exam answer is simply incorrect:
<CODE>
public interface TryThis
{
public abstract void testMethod();
}
</CODE>
This compiles without a hitch. Given the wording of the statement, the answer is simply False.
-----------------
Michael Ernest, co-author of:

    The Complete Java 2 Certification Study Guide


    [This message has been edited by Michael Ernest (edited November 22, 2000).]


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract Method