This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Kathy-Bert book: question5 p.135 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Kathy-Bert book: question5 p.135" Watch "Kathy-Bert book: question5 p.135" New topic
Author

Kathy-Bert book: question5 p.135

Danny Tran
Greenhorn

Joined: Mar 02, 2003
Posts: 8
hi,
can somebody explain for me why in question 5 page 135 in Kathy-Bert programmer guide, the declaration no.5
private native void m1();
is a legal one???
is it an abstract method or if it is not, can it end with the semicolon ???
Many thanks
danny.
Sarma Lolla
Ranch Hand

Joined: Oct 21, 2002
Posts: 203
The method is declared as native. That means the implementation of the method is done in language like C. Compiler wouldn't verify any thing else on these native methods till the method is called from your code. At that time if the right library having this method is not linked you get a run time error. At compile time no checks for native methods.
Native methods can't have body. They should end with simply a semicolon.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Kathy-Bert book: question5 p.135
 
Similar Threads
.properties vs JNDI
k&b book
Regarding SCJP Voucher
Tutorial for format/printf
please please help.(which book is better to start study of java)