How to add comments to your code
What is a code comment, how to add a comment to the code, I believe that everyone who knows programming is no stranger. There are often many interesting brain holes and "truths" in the notes . Today, let's take a look at the humorous notes that are 6 to fly and are broken.
Annotated series with too much information -
1. Are you making it? I am a rookie! Note: I am not sure if we need this, but too scared to delete. ... ...Chinese: Individuals don't confirm if they need it, but they don't dare to delete it.
2. "What can I do? I am desperate!" Note / I am not responsible of this code. // They made me write it, against my will.Chinese: Individuals are not responsible for the quality of this piece, because they forced me to write this code in violation of my heart.
Chinese: Crazy? This is Sparta!
Chinese: Who cares?
5, "Kill me, I will not believe" comment /** * Always returns true. */ public boolean isAvailable() { return false; }Chinese: return true
6, "I wrote the most code X" comment / * * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the Moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */English: You may believe that you can understand the following code, but it is absolutely impossible, believe me. Once you've debugged, you'll definitely regret it and try to optimize this code. The best way is to close the file and play with something you like.
7, "Typical" comments that can often be seen in Java programs try { } finally { // should never happen }Chinese: definitely won't run here
8, not confident to let the people who see the comments have some distressed comments // This code sucks, you know it and I know it. //Move on and call me an idiot later.Chinese: This code is really frustrating, I know you know, don't yell at me 2B first, please go down first
Chinese: Outside the Milky Way far and far away (this code can run, it's definitely a miracle)
Chinese: I rub! (Note: In simple terms, double penetration represents a "posture posture", everyone Baidu or Google ~)
When I came back from WC, I saw this line of comments, I was already crying in front of the computer...
Forced full comment:
Do not talk, BUG too much, I have to work overtime to change the BUG!
Power Inverter,Sine Wave Solar Power Converter,Pure Sine Wave Solar Inverter,Pure Sine Wave Power Inverter
Zhejiang Kaimin Electric Co., Ltd. , https://www.ckmineinverter.com