cant resolve symbol - calling a mehod from a diffrent class

Answered

hi

i got several classes in the same package, in the same src folder, in the same project. Again, all the classes are in the same folder, and all of them are public.

i want to use a function which is written in one of the classes in a different class .

i am getting the same error all the time.

please help me im un dire need to finish the project.

0
4 comments

Please try File | Invalidate Caches | Invalidate and Restart.

If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.

0

In the following link you will see my code, im trying to access these methods from a different class :

https://gist.github.com/MaorRocky/12f44c25101793b010dd78211fc616d0.

 

 

in the picture you can see that the method isAllDiff is in bright red, and im getting the error.

you can see that all of the files are in the same folder, and all of the classes are public.

0

To use static methods defined in different classes without the qualifying class names you must add the static import:

import static Assign2.TasksArrays.*;

If you have generic Java language questions that are not specific to the IDE, the better place to ask would be http://stackoverflow.com/.

0

Much appreciated, you really helped me.

0

Please sign in to leave a comment.