Cetak nomor baris java

System.out.println("I'm in line #" + 
    new Exception().getStackTrace()[0].getLineNumber());
Vivacious Vulture