StackTraceElement.isNativeMethod() has the following syntax.
public boolean isNativeMethod()
In the following code shows how to use StackTraceElement.isNativeMethod() method.
public class Main { /*from w w w. ja v a 2 s .c o m*/ public static void main(String[] args) { System.out.println("Is Native method ? :"); System.out.println(Thread.currentThread().getStackTrace()[0].isNativeMethod()); } }
The code above generates the following result.