Multiply Two Numbers in Java:

public class MultiplyTwoNumbers {

 public static void main(String[] args) {

 double first = 2.5, second = 4.5;

 double product = first * second;

 System.out.println(“The product is: ” + product);

 }

Output:

The product is: 11.25

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *