• Comments In Java | Java Tutorial

    In Java, we have two types of comments. We use comments to write some text within our code. The compiler will ignore these comments.

    Syntax:

    Note: Comments in between the code gives more readability

    Do you want to show auto-generated code whenever you create a new class as shown below?

    Follow the below steps:

    I assume you are using Eclipse IDE.

    1. In eclipse, Go to Window – Preferences
    2. From the left panel, Select Java – Code style – Code template
    3. Under ‘Configure generated code and comments’, Expand Comments – Select Files and Click Edit and Enter your text and click OK.

    Whenever you create a new class, you can see comments.

    Sample Program:

    Must Read: Java Tutorial

    Sharing is caring.

    Share on facebook
    Facebook
    Share on twitter
    Twitter
    Share on linkedin
    LinkedIn

    Like This Post?

    We have a lot more where that came from?

    We only send really good stuff occasionally, promise.

    Rajkumar SM

    Leave a Comment

    Your email address will not be published. Required fields are marked *

    Share on facebook
    Share on google
    Share on twitter
    Share on linkedin
    Share on whatsapp

    Recent Posts:

    Scroll to Top
    API Testing eBook

    DOWNLOAD FOR FREE