Fixing cannot find symbol in Java

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I was faced with an error msg, "Cannot find symbol Hashmap". So I just updated my jdk to the latest version and it fixed the issue.

iconelias
Автор

When I JUST decompile a file .class to .java and recompile to .class I get this error. without change ANYTHING in the file. Why????

Ebcorehigh
Автор

if u didnot fix it yet
try to use capital lettere in built in function
like next : use String not string
java is sensitive

abdomagdy
Автор

Mine just says “the operator ‘-‘ is undefined for the argument type(s)...” I feel like I have to import something, I just don’t know what

mahersabit
Автор

hey I imported a project via github, and now it give me this error, on all the imports of other packages right now, but It seems it isn't one of the options you presented

mario-pan
Автор

Can you help me please?

PROGRAM

public class lab4 {

public static void main(String[] args)
{
Vehicle BMW = new Vehicle();
BMW.speed = 60;
BMW.direction = 45;
BMW.name = "Луиджи";
BMW.info();
}
}

ERROR

/lab4.java:5: error: cannot find symbol
Vehicle BMW = new Vehicle();
^
symbol: class Vehicle
location: class lab4
/lab4.java:5: error: cannot find symbol
Vehicle BMW = new Vehicle();
^
symbol: class Vehicle
location: class lab4
2 errors

Lasor