삼항연산자

stackoverflow에 본 삼항연산자와 final과 관련된 문제이다 자세한 내용은 다음과 같다. public class errorEX { public static void main(String[] args) { int a=10, b=20; byte c= (a>b) ? 50 : 10; System.out.print(c); } } //result : java: incompatible types: possible lossy conversion from int to byte public class finalEX { public static void main(String[] args) { final int a=10, b=20; byte c= (a>b) ? 50 : 10; System.out.print(c); ..
comoZ
'삼항연산자' 태그의 글 목록