console.log("What ? " + Cord);/Java

<Git> CondOper01.java

Once In A Lifetime 2023. 2. 2. 19:00
728x90
반응형

package ch01_variable_operator;

public class CondOper01 {
    public static void main(String[] args) {

        // 최대값 변수 이름 : max

        int x = 3 ,y = 8 , z = 4 ;

        int max = x >= y ? x : y ;

        max = y >= z ? y : z ;

        max = y >= (x + z) ? y : z ;

        System.out.println("최대 수 : " + max);

    }
}

 

cf ) Myjava/CondOper01.java at master · nolooker/Myjava (github.com)

728x90
반응형