# Java program to calculate the product of two numbers

Java Programming Java8Java Technologies

#### Complete Java Programming Fundamentals With Sample Projects

98 Lectures 7.5 hours

#### C Programming from scratch- Master C Programming

Best Seller

60 Lectures 8 hours

#### C++ Programming

238 Lectures 56.5 hours

The * operator in Java is used to multiply two numbers. Read required numbers from the user using Scanner class and multiply these two integers using the * operator.

## Example

import java.util.Scanner;
public class MultiplicationOfTwoNumbers {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the value of the first number ::");
int a = sc.nextInt();
System.out.println("Enter the value of the first number ::");
int b = sc.nextInt();
int result = a*b;
System.out.println("Product of the given two numbers is ::"+result);
}
}

## Output

Enter the value of the first number ::
55
Enter the value of the first number ::
66
Product of the given two numbers is ::3630
Updated on 13-Mar-2020 07:07:49