aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes question about Dan's mock exam (interfaces) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "question about Dan Watch "question about Dan New topic
Author

question about Dan's mock exam (interfaces)

Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
taken from Dans Exam

Compile-time errors are generated at which lines?
a. 1
b. 2
c. 3
d. 4
e. 5
f. None of the above.
I selected E, because that method (public native void m1();) is not implementing anything (notice it doesn't have curly brackets).It should be declared abstract and so the class.
all other methods have implementations (even though they only have {} ).
But Dan's answer is F (none of the above).


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Ryan Wilson
Ranch Hand

Joined: Apr 16, 2003
Posts: 65
native methods are like abstract (they end in ; without any {})
public native void m1();
Native uses platform specific language, therefore the code cannot be implemented in the Java method.
The code that native implements is loaded from a library somewhere on the system.
Robbie kyodo
Ranch Hand

Joined: May 05, 2003
Posts: 97
hey
interface can't be final .


SCJP 2 1.4
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Robbie kyodo:
interface can't be final .
But there is no final interface in the question.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
 
subject: question about Dan's mock exam (interfaces)