When referring to the corresponding class after copying the class files of other projects in java, the copied reference is still the old path problem

The compiler I use is IDEA. In the process of learning java, I found that when copying class A files directly from other projects to the new project, when copying and referencing class A, it is still the path of the old project, as shown in the figure below:

 Solution: Change the package path to the package path of the current new project, as shown below

 At this point the problem is solved:

Just to record the problems encountered in the learning process 

 

Guess you like

Origin blog.csdn.net/weixin_57997644/article/details/131757288