We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b4306c commit d490e12Copy full SHA for d490e12
numbers/greater_number/greater.java
@@ -0,0 +1,22 @@
1
+public class greater{
2
+public static void main(String[] args){
3
+ try{
4
+ if(args.length!=2){
5
+ System.out.println("You have to type in just 2 Numbers.");
6
+ }
7
+ else{
8
+ if(Integer.parseInt(args[0])>Integer.parseInt(args[1]))
9
+ {
10
+ System.out.println(args[0] + " is greater then " + args[1]);
11
12
13
+ System.out.println(args[1] + " is greater then " + args[0]);
14
15
16
17
+ catch(NumberFormatException e)
18
19
+ System.out.println("You have to type in 2 >Numbers<");
20
21
+}
22
0 commit comments