Even if under the same class; you still need to import static with absolute package path.
example:
package a.b.c;
import static a.b.c.StaticStrings.ONE;
public class Main {
public static void main() {
System.out.println(ONE);
}
}
package a.b.c;
public class StaticStrings {
public static final ONE="The one";
}
if you you are a newbie who is still learning and didn't declare any package
then declare package and proceed as follow:
1. create a directory name ansicolor
2. move both of the files to ansicolor directory
3. In both file declare package as
package ansicolor;
4. from the parent of ansicolor directory run the following command
javac ansicolor/Main.java