Common mistakes in java development

1. String sorting

I believe many people are aware of string sorting. Today I encountered another problem like this. Scenario: The printed labels of the goods being transported are not continuous, and the printing order is 1, 10, 11, 12, 2, 3, 4

5,6,7,8,9, a total of twelve labels, the printing is not continuous, I believe that many veterans can tell at a glance that this is the sorting of strings, today I actually have to look for it for a long time. So write it down, it is also proficient A kind of skill. This sort of string is also more common in treeMap, so you need to pay attention.

2. Placement of timing files

In development, the development of many modules is definitely indispensable. At this time, a file that usually exists is a timed task file. There may be timed tasks in different modules, and sometimes we may deploy more than one tomcat on the server. At this time, timed task development The files must be exquisite. If the timing tasks are placed in different jar packages, then the same tomcat cannot execute all timing tasks, and other tomcats do not execute the timing task files. Because of other There are also timing tasks in the module.

3. Debug perception

The subconscious mind developed in development must not rely on debug and our tests. The most reliable dependence is the understanding of the code and the habit of self-code. The growth brought about by this habit is the most valuable .

Guess you like

Origin blog.csdn.net/qq_37375667/article/details/100110131