Basics_Que_17

Home / Java Practice Question / Basics_Que_17

Basics_Que_17


Write a Java program that accepts three numbers and check All numbers are equal or different or Neither all equal nor different.....

program : 

public class Loop {

public static String checkNum(int num1, int num2,int num3){

if(num1==num2 && num2==num3){
return "All Equal .....";
}else if(num1!=num2 && num2!=num3 && num1!=num3){
return "All Different....";
}else{
return "Neither all equal nor different....";
}
}

}