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 06ae81a commit bcd1202Copy full SHA for bcd1202
maxmin/MaxMin.java
@@ -0,0 +1,34 @@
1
+package maxmin;
2
+
3
+public class MaxMin
4
+{
5
+ int x;
6
+ int y;
7
+ MaxMin(String a,String b) throws NumberFormatException
8
+ {
9
+ x = Integer.parseInt(a);
10
+ y = Integer.parseInt(b);
11
+ }
12
13
+ public int findMax() throws BothEqualException
14
15
+ if( x== y)
16
+ throw new BothEqualException("Please enter unequal values : ");
17
18
+ if( x > y )
19
+ return x;
20
+ else
21
+ return y;
22
23
24
+ public int findMin() throws BothEqualException
25
26
27
28
29
+ if( x < y )
30
31
32
33
34
+}
0 commit comments