A Java program is made up of classes, these classes are made up of methods, constructors and variable definitions, these methods and constructors are made up of set of instructions and these set of instructions are called statements in Java. Statements are tasks carried out by the computer to solve a problem, they are the building blocks of a Java Program. In order to have a good understanding of Java Statement it will first be beneficial to understand how to break a solution down into algorithmic steps. Each step of an algorithm can be represented as a Java statement or statements.
As promised in my last post, I will be sharing sample codes showing how Java operators behave. I have named the Java classes in the sample codes after the operator class and I also added the result of each operation on the variables.
Sample Class showing Arithmetic Operations: