Java applets knowledge summary 01

1. integer multiplication or addition, if more than the maximum integer value, will become negative

2. String comparison may be used: s1.compareTo (s2), s1 is greater than s2 if the return value is greater than 1, equal to the return value is equal to 0, the return value is less than less than 1

3. char value comparison to single quotation marks: ''

4. think more about critical conditions are satisfied

5. TreeSet.descendingIterator () reverse traversal

6. The test unit can be: while (i <20) {i ++;} do repeatedly invoke the debugger, i ++ attention to put at the beginning of the code. Avoid abnormal cause, i ++ can not be performed, an infinite loop. while (true) could also lead to an infinite loop

7. Unit Test:

     @RunWith(SpringRunner.class)

     @SpringBootTest(classes =WebEmbeddedApplication.class)

 

Guess you like

Origin www.cnblogs.com/Jtianlin/p/11125545.html