I am new to java. I am working with this one .java file shown here, and for some reason the identifier location is not a found symbol
import java.lang.String; class FishSpot { public static void main (String args[]) { String locaton; location = "Corson's Inlet"; if (location != "") System.out.print("Fishing Spot: " + location); } }
and here's the error message when compiling with javac in command prompt:
Thanks in advance for your help.C:\Program Files\Java\src\com\scjaexam\ex2_4>javac Pseudo2_4.java
Pseudo2_4.java:10: cannot find symbol
symbol : variable location
location: class FishSpot
location = "Corson's Inlet";
^
Pseudo2_4.java:11: cannot find symbol
symbol : variable location
location: class FishSpot
if (location != "")
^
Pseudo2_4.java:12: cannot find symbol
symbol : variable location
location: class FishSpot
System.out.print("Fishing Spot: " + location);
^
3 errors