@@ -10,30 +10,30 @@ public class CompareMethod1
1010 public static void main (String args [])
1111 {
1212 System .out .print ("\n Program to demonstate the Overloading of methods" );
13- MethodOverloaded mo = new MethodOverloaded ();
13+ // MethodOverloaded mo = new MethodOverloaded();
1414 Scanner reader = new Scanner (System .in );
1515 System .out .print ("\n \n Enter two integers: " );
1616 System .out .print ("\n First: " );
1717 int num1 = reader .nextInt ();
1818 System .out .print ("\n Second: " );
1919 int num2 = reader .nextInt ();
20- mo . compare (num1 , num2 );
20+ compare (num1 , num2 );
2121
2222 System .out .print ("\n \n Enter two characters: " );
2323 System .out .print ("\n First: " );
2424 char c1 = reader .next ().charAt (0 ) ;
2525 System .out .print ("\n Second: " );
2626 char c2 = reader .next ().charAt (0 ) ;
27- mo . compare (c1 , c2 );
27+ compare (c1 , c2 );
2828
2929 System .out .print ("\n \n Enter two Strings: " );
3030 System .out .print ("\n First: " );
3131 String s1 = reader .next ();
3232 System .out .print ("\n Second: " );
3333 String s2 = reader .next ();
34- mo . compare (s1 , s2 );
34+ compare (s1 , s2 );
3535 }
36- public void compare (int x , int y )
36+ void compare (int x , int y )
3737 {
3838 if (x > y )
3939 {
@@ -45,7 +45,7 @@ public void compare(int x, int y)
4545 }
4646 }
4747
48- public void compare (char ch1 , char ch2 )
48+ void compare (char ch1 , char ch2 )
4949 {
5050 int x = (int ) ch1 ;
5151 int y = (int ) ch2 ;
@@ -59,7 +59,7 @@ public void compare(char ch1, char ch2)
5959 }
6060 }
6161
62- public void compare (String str1 , String str2 )
62+ void compare (String str1 , String str2 )
6363 {
6464 if (str1 .compareTo (str2 ) > 0 )
6565 {
0 commit comments