Monday, August 17, 2015

Java Comments

Hi All...!

This post is about Java Comments, commenting makes your code easy to read and easy to understand, The Java compiler ignores comments, so they do not cause the computer to perform any action when the program is run.

There are two types of Java comments commonly in use among Java programmers,

1) Single Line Comment

Single line comments begins with two forward slashes  "//".

Following example shows how to use Java single line comments in source code.





Let's take a look at what will happen when we compile and run this commented code.





That code runs normally, as I told you earlier Java compiler simply ignores comments.


2) Traditional Comment (Multiple Lines Comment)

This traditional comments begins with the forward slash and asterix symbol and ends with asterix symbol and forward slash.

Let's take a look how to use this multiple line comments in Java program


Let's compile and run that program,


It's run normally because compiler ignores comments.

9 comments:

  1. Absolutely posting! Lots of useful information and inspiration, both of which we all need!Relay appreciate your work.

    java examples

    ReplyDelete
    Replies



    1. IntelliMindz is the best IT Training in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.

      Java Training Online Training
      Java Training In Bangalore
      Java Training In Chennai
      Java Training In Tirupur

      Delete
  2. Thanks so much for sharing this awesome info! I am looking forward to see more postsby you!
    程序代写

    ReplyDelete
  3. I value the post.Really thank you! Keep writing. assemblylanguagetuts

    ReplyDelete
  4. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Kopar at Newton CEL Development

    ReplyDelete
  5. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.
    itcs代写

    ReplyDelete
  6. There are various dissertation online websites on the internet are located discover not surprisingly noted on the webpages. sql exists

    ReplyDelete
  7. This blog website is pretty cool! How was it made !
    代 寫 cs

    ReplyDelete
  8. It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait reading. I am impressed with your work and skill. Thanks. targonca szállítás Debrecen Europa-Road Kft.

    ReplyDelete