Java是否包含对编译代码的注释? [英] Does Java include comments on the compiled code?

查看:197
本文介绍了Java是否包含对编译代码的注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,标题是不言自明的。我想知道这个时候编译一个有很多行评论的项目。这有点傻,因为jar文件不会增加太多(一些字节),但我很好奇,如果这可能影响一个程序有很多代码和评论。

Well, the title is self-explanatory. I wondered this while compiling a project which has a lot of lines commented. It's a bit silly because the jar file wouldn't increase much (some bytes) but I'm curious if this could affect a program with a lot of code and comments.

感谢

推荐答案

这不会影响执行或性能(除非您已注释掉错误的语句:-)

It would not affect the execution or performance (unless you have commented out the wrong statements :-)

但是,肯定会影响可读性。没有理由拥有大量已注释掉的代码(在生产中),版本控制是走路

But it definitely would affect readability. There is no reason to have large blocks of commented out code (in production), version control is the way to go

查看此问题 问题已关闭。

这篇关于Java是否包含对编译代码的注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆