-----------------------------------------------

*JavaScript
var a = 3;
var b = 2;
var max;

max = a > b ?  a : b;              - 가능
a > b ? max = a : max = b;     - 가능
-----------------------------------------------
*Java
int a = 1;
int b = 2;
int max;

max = a > b ?  a : b;              - 가능
a > b ? max = a : max = b;     - 문법 오류 (x)

-----------------------------------------------







http://hangaebal.blogspot.kr/2014/06/java-javascript-difference-between-java.html

+ Recent posts