Doesn’t really matter, classes can be kept in a single file as well as multiple files for each class. But it’s advisable for you to keep the classes with their independent functionality into separate files. As for the error, you are accessing a non - static variable or an instance variable from a static method which isn’t possible in Java. For the workout, you could create an object of the same class within the static method and then use that object to access that instance variable. Or another way to deal with this is to, create another instance method and make a call to the static method from this method passing the instance variable as a parameter now to the static method. Now, since this variable becomes a local variable for the static method, it can easily access the value.