public class Mod{
public static void main(String argv[]){
}
public static native void amethod();
}
1) Error at compilation: native method cannot be static
2) Error at compilation native method must return value
3) Compilation but error at run time unless you have made code containing native amethod available
4) Compilation and execution without error
Answer 4) Compilation and execution without error
It would cause a run time error if you had a call to amethod though.
No comments:
Post a Comment