first commit
This commit is contained in:
15
LargestNumberStatic.java
Normal file
15
LargestNumberStatic.java
Normal file
@@ -0,0 +1,15 @@
|
||||
// Program to find out the largest number (Static Method).
|
||||
|
||||
public class LargestNumberStatic {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
int num1 = 10, num2 = 20, num3 = 7;
|
||||
if( num1 >= num2 && num1 >= num3)
|
||||
System.out.println(num1+" is the largest Number");
|
||||
|
||||
else if (num2 >= num1 && num2 >= num3)
|
||||
System.out.println(num2+" is the largest Number");
|
||||
else
|
||||
System.out.println(num3+" is the largest Number");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user