This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tistory.seungdols.effetive.ex_1; | |
/** | |
* @PROJECT effectiveJava | |
* @PACKAGE com.tistory.seungdols.effetive.ex_1 | |
* @WRITTER Administrator | |
* @DATE 2015-09-21 | |
* @HISTORY | |
* @DISCRIPT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tistory.seungdols.effetive.ex_1; | |
/** | |
* @PROJECT effectiveJava | |
* @PACKAGE com.tistory.seungdols.effetive.ex_1 | |
* @WRITTER Administrator | |
* @DATE 2015-09-21 | |
* @HISTORY | |
* @DISCRIPT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tistory.seungdols.effetive.ex_1; | |
/** | |
* @PROJECT effectiveJava | |
* @PACKAGE com.tistory.seungdols.effetive.ex_1 | |
* @WRITTER Administrator | |
* @DATE 2015-09-21 | |
* @HISTORY | |
* @DISCRIPT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SingletonPatternEx1 { | |
//public final field를 이용한 싱글턴 패턴 | |
public static final SingletonPatternEx1 INSTANCE = new SingletonPatternEx1(); | |
private SingletonPatternEx1() { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tistory.seungdols.effetive.ex_1; | |
/** | |
* @PROJECT effectiveJava | |
* @PACKAGE com.tistory.seungdols.effetive.ex_1 | |
* @WRITTER Administrator | |
* @DATE 2015-09-21 | |
* @HISTORY | |
* @DISCRIPT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tistory.seungdols.effetive.ex_1; | |
/** | |
* @PROJECT effectiveJava | |
* @PACKAGE com.tistory.seungdols.effetive.ex_1 | |
* @WRITTER Administrator | |
* @DATE 2015-09-21 | |
* @HISTORY | |
* @DISCRIPT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Object readResolve() | |
{ | |
//동일한 객체가 반환되도록 하는 동시에, 가짜 객체는 GC가 처리 하도록 함 | |
return INSTANCE; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tistory.seungdols.file.rename; | |
import java.io.File; | |
import java.util.Scanner; | |
/** | |
* @PROJECT effectiveJava | |
* @PACKAGE com.tistory.seungdols.File.rename | |
* @WRITTER Administrator | |
* @DATE 2015-09-21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
btn_search.addActionListener(e -> { | |
btnAction(e); | |
}); | |
btn_search.addActionListener(new ActionListener() { | |
@Override | |
public void actionPerformed(ActionEvent e) { | |
btnAction(e); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String path = GetFilePath.class.getResource("").getPath();//현재 자신의 경로 | |
String path = GetFilePath.class.getResource("/").getPath();//classes의 최상위 경로 | |
new File("").getAbsolutePath();//절대 경로 | |
new File("").getCanonicalPath();//상대 경로 |
OlderNewer