How do you multiply something in Java?

How do you multiply something in Java?
Answer
In order to multiply numbers in Java, we will use the asterisk (*) between each number or variable.
  1. int x = 12;
  2. int y = 13;
  3. int z = x * y;
  4. System. out. println(“Multiplication: ” + z);
 

Tìm kiếm

Back
Top