Multiplication
You can multiply any two int
s using the *
operator.
void main() {
// x will be 15
int x = 3 * 5;
// y will be 75
int y = x * 5;
// z will be 1125
int z = x * y;
System.out.println(x);
System.out.println(y);
System.out.println(z);
}