Skip to content

18.06.20

chy edited this page Jul 31, 2018 · 1 revision
[Java] float to int
float a = 2.3f;
int b = (int)a; // 2

Float A = new Float(2.7f);
int B = A.intValue(); // 2
[Java] int to formatted string
int num = 123456789;
String formatted = NumberFormat.getNumberInstance(Locale.US).format(num) // 123,456,789
[JSP] <c:out>
${param}
<c:out value="${param}">default value</c:out>
  • c:out은 기본적으로 escapeXml속성이 true로 지정이 되어 있어 오류를 방지
  • default value 설정 가능

Clone this wiki locally