FileDocCategorySizeDatePackage
Callbacks.javaAPI DocExample563Tue Dec 12 18:58:26 GMT 2000None

Callbacks

public class Callbacks extends Object

Fields Summary
Constructors Summary
Methods Summary
private voidcallback(int depth)

    if (depth < 5) {
      System.out.println("In Java, depth = " + depth + ", about to enter C");
      nativeMethod(depth + 1);
      System.out.println("In Java, depth = " + depth + ", back from C");
    } else
      System.out.println("In Java, depth = " + depth + ", limit exceeded");
  
public static voidmain(java.lang.String[] args)

    Callbacks c = new Callbacks();
    c.nativeMethod(0);
  
private native voidnativeMethod(int depth)