Single Choice Easy

QWhich arithmetic operator is used for multiplication in Java?

ID: #20123 Arithmetic Operators in Java 116 views
Question Info
#20123Q ID
EasyDifficulty
Arithmetic Operators in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A +
  • B *
  • C /
  • D -
Correct Answer

Explanation

The multiplication operator (*) in Java is used to multiply two numeric values.


public class MultiplicationExample {
    public static void main(String[] args) {
        // Define the numbers
        int num1 = 5;
        int num2 = 3;

        // Multiply the numbers using the multiplication operator
        int result = num1 * num2;

        // Display the result
        System.out.println("Result of " + num1 + " * " + num2 + " is: " + result);
    }
}

When you run this program, it will output:


Result of 5 * 3 is: 15

Share This Question

Challenge a friend or share with your study group.