Problem: I am trying to write a program, but I'm getting this compiler error: Main.java:1: error: class WeatherArray is public, should be declared in a file named WeatherArray.java public class WeatherArray { ^ 1 error I have checked my file names, and my public class is the ... How can I fix this? Here is my code: public class WeatherArray { public static void main(String[] args) { // ... } }
asked
Feb 15
Ali
5.4k points