class FunctionTest10
{
public static void main(String[] args)
{
byte b1 = 3;
byte b2 = 4;
System.out.println("byte:"+compare(b1,b2));
short s1 = 5;
short s2 = 5;
System.out.println("short:"+ compare(s1,s2));
int i1 = 44;
int i2 = 11;
System.out.println("int:"+compare(i1,i2));
long l1 = 1;
long l2 = 1;
System.out.println("long:"+ compare(l1,l2));
}
public static boolean compare(byte a,byte b){
System.out.println("byte");
return a == b;
}
public static boolean compare(short a,short b){
System.out.println("short");
return a == b;
}
public static boolean compare(int a, int b){
System.out.println("int");
return a == b;
}
public static boolean compare(long a,long b){
System.out.println("long");
return a == b;
}
}
{
public static void main(String[] args)
{
byte b1 = 3;
byte b2 = 4;
System.out.println("byte:"+compare(b1,b2));
short s1 = 5;
short s2 = 5;
System.out.println("short:"+ compare(s1,s2));
int i1 = 44;
int i2 = 11;
System.out.println("int:"+compare(i1,i2));
long l1 = 1;
long l2 = 1;
System.out.println("long:"+ compare(l1,l2));
}
public static boolean compare(byte a,byte b){
System.out.println("byte");
return a == b;
}
public static boolean compare(short a,short b){
System.out.println("short");
return a == b;
}
public static boolean compare(int a, int b){
System.out.println("int");
return a == b;
}
public static boolean compare(long a,long b){
System.out.println("long");
return a == b;
}
}