I have a program that uses 2 classes: 'main.class' and 'map/read.class'.
These are the (essential parts of the) files:
map/read.java
main.javaCode:package map;
public class read {
public static void main(String[] args) {
String foo = "bar";
// Doing some stuff
}
}
When I run main.class, I want the console to display "bar", but instead it gives me the next error:Code:import map.read;
import java.io.*;
public class main {
public static void main(String[] args) {
System.out.println(foo);
// Doing more stuff
}
}
main.java:6: cannot find symbol
symbol : variable foo
location: class main
System.out.println(foo);
^
1 error
(Note: the '^' is being displayed underneath the 'f' of 'foo')
Anyone has any idea why?

