Good programming style makes your code much more readable and maintainable. Here are some basic style directives that I expect you to follow in your code. Here is a template for structuring your Java classes, which I encourage to you use.
Method (a) | Method (b) |
if (a == b) { c = d; e = f; } |
if (a == b) { c = d; e = f; } |
name, age, personName, getAge
class Person, class Gradebook, class BlackjackGame
MAX_CAPACITY, DIME_VALUE
private
.public
if they are to be accessed
from outside of the class. Otherwise, they should be
protected
or private
.