mercredi 7 septembre 2016

why is it black if comfile?

package first;

public class yo{

public boolean isAgeDiscountable(int age){
    boolean isDiscount ;

    if ((age<=19)||(age>=60)){
        isDiscount =true;
    }
    else{
        isDiscount = false;
    }
return isDiscount;}

public static void main(String[]args){

    yo exam = new yo();
    exam.isAgeDiscountable(15);
    exam.isAgeDiscountable(27);
}
}

Aucun commentaire:

Enregistrer un commentaire