Java examples for java.lang:Exception
get Current Line Number
//package com.java2s; public class Main { public static int getCurrentLineNumber() { StackTraceElement stack[] = (new Throwable()).getStackTrace(); return stack[1].getLineNumber(); }/* w ww. ja va 2 s . c o m*/ }