본문 바로가기

전체 글109

자바 싱글턴 1.public class Singleton { private static Singleton singleton = new Singleton(); private Singleton() { // TODO Auto-generated constructor stub } public static Singleton getInstance() { return singleton; } } 2. public class Singleton { private static Singleton singleton = null; private Singleton() { // TODO Auto-generated constructor stub } // 해당 인스턴스는 완벽한 싱글턴이 안된다. 스레드 타이밍에 여러개의 인스턴스가생길 수 있다. //.. 2018. 4. 9.
자바 컬렉션 자바 컬렉션. 다수의 데이터를 쉽게 처리할 수 잇는 표준화된 방법을 제공하는 클래스. List : 순서가 있는 데이터의 집합. 데이터의 중복을 허용. 구현클래스 : ArrayList, LinkedList, Stack, Vector Set : 순서를 유지하지 않는 데이터의 집합, 데이터의 중복을 허용하지 않는다. 구현클래스 : HashSet, TreeSet Map : 키(key)와 값(value)의 쌍(pair)으로 이루어진 데이터의 집합. 순서는 유지되지 않으며, 키는 중복을 허용하지 않으며, 값은 중복을 허용한다. 구현클래스 : HashMap, TreeMap, Hashtable, Properties Stack, Queue Stack : LIFO(Last In First Out) 가장 마지막 데이터를 가.. 2018. 4. 5.
코틀린 정리 코틀린 너무 어렵게 생각하지 말고 기존에 사용하던 자바언어에서 조금 더 편리하게 사용하기 위해변경된 부분이 있다. 변수 선언.코틀린 에서는 모든 변수는 반드시 최초(한번) 초기화가 되야 한다. 변수에 의미가 없으면(기본형이던 참조형이던 변수 생성 후 타입을 적용해야한다.) 선언 할 수 없다. val 및 var 키워드는 형식 추론이 가능할 때만 사용할 수 있다.그렇지 않은 경우 형식을 선언해야 한다. 형식 추론은 각 코틀린 릴리즈가 나올 때마다 개선되고 있는 것으로 보인다. 지역 변수(local variable) 이며 전역 변수(global variable)의 개념이 없다. val 읽기 전용 변수(불변, 상수).var 읽기 쓰기 변수(가변, 변수). 값의 변경이 불가능한 변수 생성.val temp :(ty.. 2018. 4. 4.
centos 7 http.conf # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information. # In particular, see # # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # co.. 2018. 3. 27.