How to add an already created Java class to a package?

已回答

How to add an already created Java class to a package?

 

        

0

You can use Move refactoring to move the already existing class to the package you need: https://www.jetbrains.com/help/idea/move-refactorings.html.

If the class is external to the project, use your favorite file manager to copy it into the package.

It's also possible to copy the class contents and paste it it in the project view, IDE will create a class file automatically from the clipboard.

1

请先登录再写评论。