public class Demo {
public static void main(String[] args)

/* This reads the input provided by user * using keyboard */
Scanner scan = new Scanner(;
System.out.print("Enter first number: ");
// This method reads the number provided using keyboard
int num1 = scan.nextInt();

System.out.print("Enter second number: ");
int num2 = scan.nextInt();
// Closing Scanner after the use
// Calculating product of two numbers
int product = num1*num2;
// Displaying the multiplication result
System.out.println("Output: "+product);
} }


Enter first number: 25 Enter second number: 5 Output: 125

Subscribe For Daily Updates

JAVA File IO examples

JAVA Date & Time Progamming Examples

JAVA Collections

Flutter Questions
Android Questions