Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

How to get line number in java source code?



Hi

can any java guru tell me how get the method starting line number of currently executing method? For example in class A there may be a method

void aa(int c, int d) // line number , say 512
{

// some code

}

I need to get this 512 during execution of this aa.