会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
soildong
博客园
首页
新随笔
联系
管理
订阅
2013年11月16日
Java学习-----像C那样打印文件名和行号
摘要: 在C/C++的程序,编译器提供了两个宏来支持取得源文件中的行号和文件名,这两个宏是__FILE__,__LINE__在Java中,可以使用下列代码:Thread.currentThread().getStackTrace()[2].getLineNumber();Thread.currentThre...
阅读全文
posted @ 2013-11-16 19:24 firerdong
阅读(178)
评论(0)
推荐(0)
编辑
公告