Last Updated: 12 August, 2022
On this page, we are going to learn how to write a Java Program to multiply two numbers.
There are two Java programs given below as an example for understanding. In the first program we are passing two numbers into the multiply method, and in the other program we are taking numbers from the user.
multiplication of two numbers = number1 * number2
Let's see the Java Program Implementation.
Output
First Number: 20.0
Second Number: 40.0
Output: 800.0
First Number: 10.5
Second Number: 20.75
Output: 217.875
Output
Enter first number: 20.50
Enter second number: 50.75
Output: 1040.375
That's all guys, hope this Java Program is helpful for you.
Happy Learning... 😀
feedback@javabytechie.com