Java for Humans {Operators}

Lincoln W Daniel
ModernNerd Code
Published in
6 min readDec 18, 2015

--

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

Now that we understand how to make variables, the different datatypes available to us in Java, and how to write code others can understand, let’s try to manipulate some data with Java operators.

Why Operators are Important & Useful

Remember that we program to capture and manipulate information, data, to create new data for users to consume. We’ve learned how to capture data and store it in variables, so this chapter will focus on manipulating our data. We manipulate our data by running operations on it by with operators. Operators allow us to assign data to variables, do math with data, connect data, and compare data.

There are an infinite number of operations you can run on your data with only a small, finite number of operators available to you. This is both good and bad. Bad because you are limited to how many ways you can operate on the data you have. Good because you only need to remember a few special symbols that let you manipulate your data. On the plus side, you can combine the few operators you have to do an infinite number of operations.

Java provides us 42 operators to work with. Twenty-seven of the operators are mere combinations of the fifteen base operation symbols. More good news is you only need to know a few of those to begin working with Java. Many experienced programmers don’t…

--

--

Lincoln W Daniel
ModernNerd Code

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