Java arithmetic is easy!

Your video will begin in 10
65 Views
Published
#java #javatutorial #javacourse

public class Main {
public static void main(String[] args) {

// Arithmetic Operators

int x = 10;
int y = 2;
int z;

z = x + y; // ADDITION
z = x - y; // SUBTRACTION
z = x * y; // MULTIPLICATION
z = x / y; // DIVISION
z = x % y; // MODULUS

System.out.println(z);

}
}
Category
Bro Code
Tags
java tutorial, java course, java programming
Be the first to comment