I have a C program to check whether the machine stack is growing up or down in memory in.

It goes like that :

#include <stdio .h>

void sub(int *a) {
 int b;

 if (&b > a) {
    printf("Stack grows up.");
 } else {
    printf("Stack grows down.");
 }
}

main () {
 int a;
 sub(&a);
}

Now i want to do the same in Java. :-)

Any one knows a solution without writing any native code ???

Thanks

Edit
Report