조건문은 조건에 따라서 다르게 동작하도록 하는 기능이다.

if(true){
System.out.println("result : true");
}
if(false){
System.out.println("result : false");
}
if (true) {
System.out.println(1);
} else {
System.out.println(2);
}
자바 오리엔테이션
조건문은 조건에 따라서 다르게 동작하도록 하는 기능이다.

if(true){
System.out.println("result : true");
}
if(false){
System.out.println("result : false");
}
if (true) {
System.out.println(1);
} else {
System.out.println(2);
}