Ohai. I have a few unclear questions.
I read the Java convention book provided by Deque, which was released in 1997, assuming nothing changed in that period...
1. For setting values to variables from one class to another, my teacher always makes a separate method, like, let's say we want to set a name in a class, so my teacher would make a "setName" method to set a value to the "name" variable. Now how is this different from declaring that variable to public and setting values to it like that. I don't see much of a difference, neither I was able to find it in that conventions book.
Same this with getting a value from that variable. Instead of just grabbing the value, teacher makes a separate method.
From past coding experience in other languages, global variables are never a good idea or coding practice, even if it not said in that language's conventions.
So I assume that those are global variables in Java, therefor they need a method.
2. How would you move a mountain with a spoon?