JAVACC 사용법과 예제 2 [계산기 예]
By 이것저것 | 2017년 5월 2일 |
JAVACC 사용법과 예제 1 [계산기 예] 에서 이어지는 내용 13. 음수가 앞에 나오는 경우도 고려하여 프로그램을 수정하라.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172options{ LOOKAHEAD=2;} PARSER_BEGIN(Adder) public class Adder{ public static void main(String args[]) throws ParseException{ Adder parser = new Adder(System.in); while(tr
자바의 조건문 - switch문
By 블루링의 아름다운 신세계! | 2017년 12월 10일 |
자바의 조건문 중 switch문에 대해 알아본다. If문의 조건값은 boolean형인데 비해 switch문의 조건값은 long형을 제외한 정수형(byte, short, int) 또는 char형인 것이 다르다. JDK7.0이상부터는 문자열도 지원한다. 동영상 주소 : https://youtu.be/V1VMVeYUxdY
HackerRank 30 Days of Code Challenges - 0 Days.
By Cinnamon's Pot | 2016년 11월 12일 |
프로젝트들도 끝나고 해서 취미로 시작해 본 HackerRank 30일이다. 뭐 0 Days는 역시 HelloWolrd 다. 목표Task To complete this challenge, you must save a line of input from stdin to a variable, print Hello, World. on a single line, and finally print the value of your variable on a second line.You've got this!해당 도전을 해결하기 위해서는 stdin을 변수에 입력시켜야 하고 Hello, World 를 첫 열에 inputFormat을 두번째 열에 출력해야 한다.Sample InputWelcome to 30 Days of Cod
Spring -ErrorPage[2] -ExceptionResolver
By 별소리의 엄마쟤흙먹어 | 2022년 8월 3일 |
이번에는 ExceptionResolver 관련 간단한 정리입니다. 미리 준비되어 있는 ExceptionResolver가 몇 종류 있는데, 개인적으로는 ExceptionHandlerExceptionResolver만 쓸 줄 알아도 충분하다고 봅니다. ExceptionResolver DispatcherServlet에 ExceptionResolver를 선언하여 에러 발생 시 해당 ExceptionResolver가 처리하게 하는 방식이다. 예제 <web.xml> 이글루스에서는 코드가 깔끔하게 안 나오니 티스토리에서 보시는 걸 권장합니다.(이 링크를 누르면 새 창이 열립니다.) action org.springframework.web.servlet.DispatcherSer