- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Java program to calculate the product of two numbers

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

- Related Questions & Answers
- Java Program to Find the Product of Two Numbers Using Recursion
- PHP program to calculate the repeated subtraction of two numbers
- Java program to calculate the average of numbers in Java
- Java Program to Calculate the Sum of Natural Numbers
- Java Program to Calculate the intersection of two sets
- Python Program to Find the Product of two Numbers Using Recursion
- Java program to calculate mean of given numbers
- Java Program to Calculate union of two sets
- Write a program to calculate the least common multiple of two numbers JavaScript
- Java program to find the LCM of two numbers
- Java Program to Calculate the difference between two sets
- Java Program to Add the two Numbers
- Java program to print the Armstrong numbers between two numbers
- Java Program to Find GCD of two Numbers
- Java Program to Find LCM of two Numbers

Advertisements