T
T
TonyJa2018-05-12 13:59:00
Java
TonyJa, 2018-05-12 13:59:00

Import problem. How to import?

I have 2 packages: entities and dao, these packages are in the folder package.
There was a problem with importing classes from one package to another.
That is, I want to import the User class into UserDao, I write import folder.entities.User; (The user lies in entities), and the idea is to highlight the class in red and does not import.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kornachev, 2018-05-12
@zelan

why punch it in? When you use any class in the code, it usually pulls itself up. If there are many options for importing, or the class has not been pulled up (highlighted in red), then simply put the cursor on the red word and press Alt + Enter, import will be offered in the first line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question