github.io 블로그 시작하기

Updated:

GitHub Blog 서비스인 github.io 블로그 시작하기로 했다. GitHub Blog 서비스의 이름은 Pages이다.

  1. 여름
  2. 가을
  3. 겨울

    This is a blockqute.

    This is a H1

    This is a H2

    이것은 cancelline

    int main() {
      int y = SOME_MACRO_REFERENCE;
      int x = 5 + 6;
      cout << "Hello World! " << x << std::endl();
    }
    
    public static void main(String[] args) {
     System.out.println("test");
    }
    

    인라인 코드 블럭

줄바꿈
YFM에서 정의한 제목을 이중 괄호 구문으로 본문에 추가할 수 있다. 이 글의 제목은 github.io 블로그 시작하기이고 마지막으로 수정된 시간은 2019-04-13 08:06:00 -0500이다.


Wrapper Classs and PrimitiveType

기본형(primitive type), 참조형(reference type)으로 나뉨 wrapper class : 기본 자료형(Primitive Type) 에 대해서 객체로서 인식되게 포장을 했다는 뜻이미 wrapper class를 사용하는 이유 :

  1. 객체 or 클래스가 제공하는 메소드를 사용하기 위해!!
  2. 클래스가 제공하는 상수사용(MIN_VALUE, MAX_VALUE)
  3. 숫자, 문자로의 형변환 or 진법 변환시 사용 Boxing : Primitive Type을 Wrapper Class로 바꾸는것 UnBoxing : Wrapper Class을 Primitive type으로 바꾸는것 jdk 1.5이후로 auto Boxing,UnBoxing을 지원해서 표면적으로 코딩을 할때는 잘 안보일수있다.

Sort

sort: Collections.sort() => Operates on List, Arrays.sort() => Operates on Array Primitive Type 정렬은 Dual-Pivot QuickSort를 쓰고, Object 배열들을 정렬할때는 MergeSort를 쓴다

Arrays.sort(primitive type) -> 최악의 경우 n^2(왜냐하면, DualPivotQuickSort를 사용한다고함) 반면에 Collections.sort(Wrapper Class)-> 알다시피 병합정렬사용해서 무조건 nlogn임


Generic Type

그리고 Generic Type은 PrimitiveType 절대 안받는다, Wrapper class를 받는다 Wrapper class는 null이 들어감

Function<T,R> -> T : input type, R : Output type Object의 자손 => Boolean, Character, Number Number의 자손 => Byte,Short,Integer,Long,Float,Double, BigInteger, BigDecimal(wrapper class)

static method에서 특정 메소드를 호출시에는 그 메소드가 무조건 static method여야한다고함.. => 이유는 잘모르겠네.. 끙 그래서, class로 만든후에 그 안에 메소드를 만들고, 인스턴스화 시키고 호출을 해봤지만, static class여야 가능하다함
테스트 커밋

Tags:

Categories:

Updated:

Leave a comment