Friday, August 29, 2014

Operator kondisi Java

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author MIFTAHUL ILMI
 */
public class OperatorKondisi {
    public static void main (String[] args) {
        String status = "";
        int grade = 80;

        status = (grade >= 60)?"Passed":"Fail";
        System.out.println(status);
    }

}

No comments:

Post a Comment