+ 1

Why we use java comments like single line etc. What was the use of that any one can explain with the program??

31st May 2018, 10:24 AM
Syed Raihan Ahmed
Syed Raihan Ahmed - avatar
2 odpowiedzi
+ 2
thanks bro for ur explanation
31st May 2018, 10:25 PM
Syed Raihan Ahmed
Syed Raihan Ahmed - avatar
0
Comments are very useful in programming field! There are many reasons: 1. For an example, assume that you are going to work on a new company, with a project which is half-way done. you are going to complete the another half. If you just opened the source code and start reading, it seems to be a crash! it won't be understandable!! But if the last worker, explained the complete code with comments, it will be easier for you to understand!! 2. If you have hundreds of programs in your PC, and named them irregularly. You can't know, which code is this. To overcome this bullshit situation, if you commented about your code with comments, it will be easier for you to understand!! 3. If you making a big program, which contains thousands of lines, and you found some errors, so instead of deleting those errors, if you used comments, it will be easier for you to debug!! And there will be many scenarios like this!! Experience will teach you all.... So just keep coding until you create one!! Good Luck!!
31st May 2018, 9:17 PM
Hemath Kumar
Hemath Kumar - avatar