Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3439798
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:21:16+00:00 2026-05-18T08:21:16+00:00

When you compile your java files, does it also embed your javadocs and comments

  • 0

When you compile your java files, does it also embed your javadocs and comments into the class file?

For example, if you have large javadocs, does it effect the overall size of your class file? Or does the compiler ignore everything beginning with // and /* ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:21:17+00:00Added an answer on May 18, 2026 at 8:21 am

    No. There are several debug options that affect the size of a class file but the comments are never part of the resulting .class file.

    Some estimate:

    • -g:line just adds line number information (a few bytes)
    • -g:vars includes the full names of all variables. This is usually the most expensive option.
    • -g:source just adds the name of the source file (without path).

    Note: -parameters makes names of method parameter accessible via reflection. This is independent of -g:vars.

    Comments (and therefore JavaDoc) are never added to the bytecode.

    To see what ends up in the .class file, use javap -v plus the path of the file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Java when you compile a .java file which defines a class, it creates
Since Python is a dynamic, interpreted language you don't have to compile your code
I'm trying to use plain old java objects(POJO)'s and regular class files where needed
when I compile java file under mac terminal,output is garbled,how to solve it?(my OS
I have this Java class class Dog { private String name; public Dog() {
I am in the process of packaging my java application into a jar file.
I have a C makefile which generates header file from java code and compiles
Usually, when creating a WebWorks Javascript extension you export your source files into a
Google analytics posted on their blog about an example Java program to extract data
I see a lot a similar questions R.java can't compile , No resource found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.