[Embedded Linux] Suggestion of learning methods embedded in Linux [Transfer]

2023-03-16  

Note is an explanation of a function or a line of code.

Note will not be executed (only valid in the Java source file, the compiler will automatically ignore it and will not be compiled to the class bytecode file). Essence

Writing comment is a good habit.

  1. Single comments (LINE Comment): //
  2. multi -line comments (block comment): /* */
  3. documentation (javadoc):
/** 
 *Note content 
 */

Note:

Annotations annotation

Comments


Perhaps there may be two situations:

  1. Multi -line annotation can be nested with one -line annotation

    /*int C = 10; // Define a integer C; 
     int x = 5;*/
    
  2. Multi -line comments cannot be nested with multi -line notes

    /*
    	/*int c=10;*/
    */
    

    Reason: This situation cannot be compiled by the code, the first “/*” will be the first “/”pairing, resulting in the second”/”Can’t find a pairing, and will compile failure.

    Note:

    Therefore, it is usually avoided in actual development. Code annotations are avoided. Only under special circumstances can nested use of single notes in multi -line comments.


File→Settings→Editor→Color Scheme→Java

Select Comments → Three: Block Comment, Javadoc, LINE Comment

The right panel is the notation color and style: Bold black body/thick body italic oblique body

When custom settings, you need to remove the default inheritance below first:

Otherwise, the settings cannot be modified.

Apply

OK


2 2 2 2 2:Interesting code

https://zhuanlan.zhihu.com/p/103508033

Too cute

You can go and see if you have time.

source

Related Posts

Anroid about setting the highlights of the MPChart mid -folding line or pillar chart

NIPS 2018 thesis interpret

Python list commonly used operation The

ESP8266 WIFI module learning road (5) -Android mobile phone debugging assistant communicates with single -chip microcomputers

[Embedded Linux] Suggestion of learning methods embedded in Linux [Transfer]

Random Posts

Axios+QS Send AJAX request to get interface data

pHP related knowledge to learn about it (1)

SQLDIAG-Configuration File-Extension

Simulation MultipartFile upload file

Anroid about setting the highlights of the MPChart mid -folding line or pillar chart