Welcome to the Ranch
I have added
code tags to your code; doesn't it look better now
I shall only answer a few of your questions. I would have thought those questions would have been covered in your teaching.
When should something be
static? If you are writing object‑oriented programs, then things
static are atypical and unusual, and the norm is for everything to be instance type (i.e. not
static). I dislike the term
non‑static because it makes it seem there is something normal about things being
static. Things instance belong to the object and things
static belong to the class. You create an instance from a class (that is another description of an object) and use its instance methods and use its instance fields
via its instance methods.
Sometimes you want to call a method before there are any instances. Maybe you want a method to create instances, so you might not have any instances beforehand, and such a method would have to be
static. The
main() method has to be called before there are any instances, so it is
static. It is also
public so it can be called from outside the current package, and it doesn't return anything, so it is marked
void. The
Java® Language Specification (=JLS) is very strict about that, but those requirements might change in future releases. I think the name
main comes from a similar “function” in ealier languages like C and C++.
Sometimes you want constants, like
this number. In that case you only want one copy of the constant. A feature of things
static is that there is always one of them, whether you have one instance of the class, 2, 3, 4, 5 … 1,000,000 instances, or even no instances. So you don't need any instances and you usually make constants
static. If you go through that link and look at the remainder of that page, you won't find any way to create an instance of that class.
You will also notice that everything else in that class is marked
static. It is what we often call a “utility class,” which means it exists to provide services for other code. All its methods take information, do some calculations, and produce a result. None of them ever records any of that information for future reference, so it never needs an instance. So they had to make all methods
static too. I have seen a very dubious
classification of methods, here, which suggests when it would be a good idea to make a method
static. If you try that on the Math class, you will find the methods (I think all of them) come out as number 1368.
Challenge: work out how the
Math class could have been designed differently so as to have only instance methods.