본문 바로가기
개발/자바 Java

if 구문 예제

by 언제나초심. 2010. 6. 15.
반응형



 if("A".equals(boardId)) {//게시판A URL
  miniTrgtUrl = "/board/index.jsp?no=1";
 } else if ("B".equals(boardId)){//게시판B URL
  miniTrgtUrl = "/board/index.jsp?no=2";
 } else if ("C".equals(boardId)){//게시판C URL
  miniTrgtUrl = "/board/index.jsp?no=3";
 } else if ("D".equals(boardId)){//게시판D URL
  miniTrgtUrl = "/board/index.jsp?no=4";
 } else {
  miniTrgtUrl = "/board/index.jsp?no=5";
 }


반응형