...

/

Arithmetic Operators and Data Types

Arithmetic Operators and Data Types

Learn about the arithmetic operators and data types in Java.

Back to our project

So far, we’ve covered good ground in learning how to code for some of the project requirements. Let’s take a look at our client’s requirements once again.

Press + to interact
Project requirements that require printing on the screen
Project requirements that require printing on the screen

According to requirements 4 and 6, our app should be able to:

  • Perform calculations of addition, subtraction, multiplication, and division.

  • Compute the actual answer to each question.

So, let’s dive right in!

Adding two numbers

This should be easy: input two numbers and assign them to num1 and num2, then print ...