- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmathOperation1.java
More file actions
Latest commit
16 lines (16 loc) · 601 Bytes
/
Copy pathmathOperation1.java
File metadata and controls
16 lines (16 loc) · 601 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// utility imports..
importjava.util.Scanner;
classmathOperation1 {
publicstaticvoidmain(String[] args) {
// Scanner object...
Scannerinput = newScanner(System.in);
// Taking inputs...
System.out.println("Enter Two Number: ");
inta = input.nextInt(); // input...
intb = input.nextInt(); // input...
intmaximum = (int) (math.max(a,b)); // math operation to verify the maximum number between them..
// displaying the output...
System.out.println("The Maximum Number is: " +maximum);
input.close(); // if doesn't,, resource will be leaked...
}
}