public class MaxMethod{
public static double max(double num1,double num2){
double result;
if(num1>num2){
result=num1;
}else if(num1==num2){
result=num1;
}else
result=num2;
return result;
}
public static void main(String args[]){
System.out.println("Max value is "+max(13,15));
}
}
Hiç yorum yok:
Yorum Gönder