본문 바로가기

Java28

[Java] 반복문 내 List 객체에 add 출처http://its21c.net/248 사실 이 부분은 엄밀히 개발자의 무지(無知, Call by Value / Reference)에서 오는 오류로 JAVA 프로그램 내부의 문제라고 보기는 애매하다.하지만 여러 프로젝트를 수행하며 지켜와 본 바에 따르면 생각보다 많은 개발자들이 이 현상에 대한 원인을 명확히 알지 못해 반복적으로 이 오류를 범하고 있기에 포스팅을 남겨본다.- 잘못 된 코드 예시import java.util.List; public class test { public static void main(String[] args) { String[] strArray = {"aaa", "bbb", "ccc"}; List list = new ArrayList(); VO vo = new VO(); f.. 2016. 10. 31.
[Java] 자바 String to Date, Date to String, String to int, int to String http://nota.tistory.com/m/50 //String to Date String from = "2013-04-08 10:10:10"; SimpleDateFormat transFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date to = transFormat.parse(from); //Date to String Date from = new Date(); SimpleDateFormat transFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String to = transFormat.format(from); // String값을 int형의 값으로 바꾸는 방법 int numInt = Integer.. 2016. 9. 5.
[Eclipse] The Eclipse executable launcher was unable to locate its companion shared library The Eclipse executable launcher was unable to locate its companion shared library. Error 라고 뜰때가 있습니다. 말 그대로 런처가 실행 될 때 라이브러리 위치를 찾을 수가 없어 나는건데, linux, unix에서는 폴더 혹은 화일에 대한 권한이 없을 경우 발생 할 수 있고(뭐 eclipse를 설치한거니 그런일이 발생하기 힘드나 root권한 으로 이클립스 업데이트 실행 하면 가능성은 있음(화일에 소유자가 root가되니) window에 경우는 eclipse 설치된 위치에 eclipse.ini화일을 보면 ----------------------------- -vm C:/Program Files/Java/jre6/bin -startup plu.. 2015. 1. 15.