Alex Rivera | Logout

Does Java include comments on the compiled code?

Asked 2010-10-27T10:21:06.343
12

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.

Thanks

Edit
Report

1 Answer

5

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

See this question also.Question closed.

answered 2010-10-27T10:24:03.037

Your Answer