Comments In Java

Dear Students, aaj ke is Lecture me hum janege Comments In Java ke bare main. Yani ke java language main comments kaise karte hai. Or sath me comments kya hote hai. Types of Comments In Java aadi se related ye sare topic ham Comments In Java ke lecthure me cover karege.

Lectures Covering Topics

  • Introduction To Comments In Java In Hindi
  • What Is Comments In Java In Hindi
  • Types To Comments In Java In Hindi
  • Multi Lines Comments In Java In Hindi
  • Documentation Comment In Java In Hindi

Comment ka matlab hota hai tippani karna. Yani ki kisi special object ke liye kisi khas bat ka kahna eak comment kahlata hai. Real life main hum jab kisi khas person ke liye koi khas bat kahte hai.

To vah us khas bat ko kabhi nahi bhoolta hai. Kyonki vah bat uski importance ke liye boli gayi hai. Wo boli gayi eak khas bat jiske through hum sara moment yad rakhte hai vah comments kahalata hai.

Introduction To Comments In Java In Hindi

Jab hame program main koi method ya fir koi khas statements yad rakna ho. To hum uske liye comments ka use karte hai. Kisi program main hum kahi bhi comments likh sakte hai. kisi bhi program main hum one more then comments likh sakte hai.

Comments kisi bhi language main hamare program ke statements ko samjhne ke liye likha jata hai. Hamara likha hua program agar koi or bhi pade to aasani se vah us program ke code ko samjh sake. Kisi bhi chhote program ke coding dekh kar to hum sab us program ko aasani se samjh sakte hai.

But agar program bahut he bada hua to aap pane code ko he dekha kar nahi samjh payege ki mene ye code kis problem ki solution ke liye likha tha. Aise me humate liye comments eak bahut kaam ke cheej ho sakte

Sabse important bat yah bhi hai ki program me hum comments me jo bhi likhte hai. Or jab hum program ko run karate hai wo display par najar nahi aata hai. To ab hum seekhenge ki exam main hume Comments In Java ko kaise explain karna hai.

What Is Comments In Java In Hindi

Student’s “Comments In Java language are used to provide information about lines of code”. Comments ka use hum program ki readability ko badane ke liye karte hai.

Ye program ko explain karte hai or program ko samjhne me hamari help karte hai. Comments ko hum delimiters /* example */ ke andar likhte hai. Jaise ki main aapko pahle bhi bata chukka hun ki program main hum kisi bhi jagah comments ko likh sakte hai.

But hum eak string constants & character constants ke sath kisi comments ko nahi likh sakte hai. Eak program ke andar hum one more then comments ka bhi use kar sakte hai.

Types To Comments In Java In Hindi

Comments In Java yani ki language me comments two types ke hote hai.

  • Single line comments
  • Multi line comments
  • Documentation Comments

Ab neeche hum in comments ke bare me details me padege ke ye single line, multi line comments or Documentation comments kya hote  hai.

Single Line Comments In Java In Hindi

Single line comments ke help se hum sirf kisi eak line ke code ko he commented kar sakte hai. Yah comment double slash ( \\ ) se represent kiya jata hai.

Example of single line comments

Output

Multi Line Comments In Java In Hindi

Multiple line comments ke help se hum eak sath one more then statements ke code ko he commented kar sakte hai. Yani ke eak sath bahut sari line ko commented kar sakte hai. Yah comment slash asterisk (\* Example *\ ) se represent kiya jata hai.

Example of single line comments

Output

Documentation Comments In Java In Hindi

Student’s documentation comments ka use API documentation crate karne ke liye kiya jata hai. API documentation create Karen ke liye hume javadoc tool ka use karna padega. Yah comment slash asterisk (\** Example *\ ) se represent kiya jata hai.

Example of Documentation comments

 

Related Lecture

Dear Students, main aasha karta hun ki aapko Comments In Java Ka Lecture padh kar samjh me aa gaya hoga ki Java language main comments kaise karte hai. Yadi aapako (Comments In java) ke Lecture se related koi bhi problem hai to aap hume comment karke puch skte hai.

Share This Post On

About Author

Thakur Aman Singh

Hey, I am Aman Singh Tomar from Taj City Agra. Through This Blog I want to share my Knowledge with all of you. Read More >>

Leave a Reply

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