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

Answered

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

 

        

0
1 comment

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

Please sign in to leave a comment.