When I try and define a class, the way the book says, I get an error.
Here's the code:
public class Weather {
public static void main(String[] arguments) {
// code
}
}
And heres the error:
weather.java:1: class Weather is public, should be declared in a file named Weather.java
public class Weather {
^
1 error
I don't know enough to understand this, and the book hasn't explained it yet,
Could someone please explain what the error means, and how i would fix it?
Thank you,
Peter Slattery