Java for Humans {Static Fields & Methods}

Lincoln W Daniel
ModernNerd Code
Published in
7 min readJan 7, 2016

--

View Table of Contents | Download Supporting Code | Subscribe to ModernNerd Youtube Channel for Coding Videos | By Lincoln W Daniel

We’ve learned that we can create classes to create objects from. Furthermore, an object, or instance of a class, can have instance variables to hold information about itself and methods to manipulate and create more information for users. While not all concepts in Java are objects, most programs in Java revolve around objects.

We can put a good deal of functionality in our classes to organize our code and make remembering what our code does easier. When we have our classes created, we can make objects from them to store information and execute functions we need them to. It’s much like society.

Think of the world like a program. There are seven billion instances of the Human class, perhaps ten billion instances of the AppleTree class, five billion of the Car class, and so on for every object found in nature. There are some Human instances that execute medical functions to keep everyone healthy, some conduct law functions to keep us safe, and some education functions to advance our knowledge. Further, we create instances of the AppleTree class to provide us apples to eat and apple juice to drink, and we need instances of the Car class to get us where we need to go.

If we make an instance of a Car, we can choose its color and customize its speed. If we make an instance of a Human, we get to give it a name, and a unique…

--

--

Lincoln W Daniel
ModernNerd Code

Chief Bull @ BullAcademy.org ® Elevating writers @ ManyStories.com. Author @JavaForHumans Ex: Editor in Chief MarkGrowth (acq.), Engineer @Medium @GoPuff