본문 바로가기

java36

java for double[] ar = {1.2, 3.0, 0.8}; int sum = 0; for (double d : ar) { // d gets successively each value in ar. sum += d; } And here is the same loop using the basic for. It requires an extra iteration variable. double[] ar = {1.2, 3.0, 0.8}; int sum = 0; for (int i = 0; i < ar.length; i++) { // i indexes each element successively. sum += ar[i]; } 2019. 7. 16.
AOP 로그출력 ( Message Advice ) # AOP 로그출력 ( Message Advice ) ### 참고 : https://doublesprogramming.tistory.com/123 ### Source ```java import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.ster.. 2019. 7. 15.
IntelliJ Shortcut # IntelliJ Shortcut # 가까운 괄호찾기 : Ctrl + Shift + M # 코드 정렬 : Ctrl + Alt + L # Bookmark Creating bookmarks with mnemonics : Ctrl+F11 Toggling bookmarks : F11 Viewing bookmarks : Shift+F11 Changing order of bookmarks : Use Move Up (arrowUp, Ctrl+Up) and Move Down (arrowDown, Ctrl+Down ) # 이전작업위치 Ctrl+Left , Ctrl+Right # 마지막편집위치 Ctrl+Shift+Backspace # 대문자변환 Ctrl-Shift-U # Save Context ( 다른이름으로 저장? ).. 2019. 7. 13.
Javascript Destructuring assignment( 비구조화 할당 ) # Javascript Destructuring assignment( 비구조화 할당 ) - 비구조화 할당(destructuring assignment) 구문은 배열이나 객체의 속성을 해체하여 그 값을 개별 변수에 담을 수 있게 하는 자바스크립트 표현식(expression)입니다. #### 참고 - [https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) #### 구문 var a, b, rest; [a, b] =.. 2019. 7. 12.
Java Assertion # Java Assertion 자바 1.4의 새기능: Assertion : http://javacan.tistory.com/entry/79 #### Assertion 기본 자바 1.4 버전은 1.3 버전에 보안을 비롯한 다양한 확장 API를 추가하여 그 크기가 방대해졌을 뿐만 아니라 NIO와 로깅 등 새로운 기능을 추가함으로써 완벽한 개발 플랫폼으로 확장되었다. 이러한 새로운 기능들 중에서 자바에서는 전혀 새로운 기능이라고 할 수 있는 게 Assertion 기능이다. #### Assertion은 무엇인가? Assertion은 불리언 식(expression)을 포함하고 있는 문장이다. 그 문장이 실행될 경우 불리언 식이 참이라고 단언할 수 있다. :: 자바 1.4의 새기능이 Assertion 이다. :: .. 2019. 7. 12.
Junit Test # Junit Test #### Reference - [junit : https://junit.org/junit4/](https://junit.org/junit4/) - [junit cook book : http://junit.sourceforge.net/doc/cookbook/cookbook.htm](http://junit.sourceforge.net/doc/cookbook/cookbook.htm) - [junit tutorial : https://www.tutorialspoint.com/junit/junit_ignore_test.htm](https://www.tutorialspoint.com/junit/junit_ignore_test.htm) - [Junit 설정 : http://kamang-it.t.. 2019. 7. 12.