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 9251667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:45:36+00:00 2026-06-18T10:45:36+00:00

What are the Java conventions on primitive types? Should I be documenting each primitive

  • 0

What are the Java conventions on primitive types? Should I be documenting each primitive type if I name it properly?

/**
 * This is the variable that handles whether or not a person has turned on a light.
 */
private boolean toggleLight = false;

That just seems to me like it’s absolute overkill, if anyone has a source or just plain previous knowledge then that would be greatly appreciated.

  • 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-06-18T10:45:37+00:00Added an answer on June 18, 2026 at 10:45 am

    I think more than anything it depends on the team you are working in, different companies and even projects have different “standards”. I personally don’t bother to comment every variable, especially as variables tend to be private. If a variable is public then I will comment it so it appears in my Javadoc.

    Same goes for methods, if it’s a private method I don’t bother commenting if it’s obvious, I also don’t comment setters and getters, only methods with logic in.

    As I said though, it generally depends on the team within which you are coding.

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

Sidebar

Related Questions

In Java, static final variables are constants and the convention is that they should
In my schema I have some types that simply extend a simple XSD type
We are having this discussion in our team about code conventions for Java for:
I have a Java web application that works a lot with file conventions. I
Is it good to have Java class name like ExtractionUtils ? In naming conventions
One of the conventions of Java Beans is: The return type of the setter
Is there a CheckStyle rule file that checks against the Java Code Conventions from
There seems to be two accepted variable declaration placements for Java variables, each with
In Java code conventions, the instance variables should be placed before the methods or
Should I stick with Sun's Java code conventions for PHP code?

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.