> For the complete documentation index, see [llms.txt](https://jinwon-yoon.gitbook.io/jinonys-blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jinwon-yoon.gitbook.io/jinonys-blog/daily-log/2022.08.19.md).

# 2022.08.19

## 할일 및 한일

* [x] 이것이 자바다 6장(클래스) notion 정리(50%)
* [x] 휴식

## 경험 및 배움

### 이것이 자바다 6장(클래스) notion 정리(50%)

어제 워크샵을 다녀온 후 후유증이 커 공부를 거의 하지 못하였다. 일단 무리하지 않고 다음주 Java 세미나 준비를 하고 마무리하기로하였다.

오늘은 클래스 부분을 절반 정도 공부하고 정리하였다.

많이 보아왔지만 이게 왜그렇지? 하는 부분들을 알 수 있어 좋았다.

예시를 들면 필드를 초기화 시킬 때는 두 가지 방법이 있다.

* 필드를 선언할 때 초기값을 주는 방법
* 생성자에서 초기값을 주는 방법

대개 생성자에서 초기값을 주는 방법을 사용하는데, 생성자에서 초기화를 하면 객체 생성 시점에 외부에서 제공하는 다양한 값들로 초기화할 수 있다.

```java
...
public Korean(String n, String s) {
    name = n;
    ssn= s;
    }
...
}
```

이런식으로 생성자에서 초기화를 하여 다른 실행 클래스에서 객체를 생성하고, 다양한 값들을 넣어서 사용할 수 있다.

```java
public Korean(String name, String ssn) {
    this.name = name;
    this.ssn = ssn;
}
```

`this` 를 필드 앞에 붙이는 이유는 `this` 는 객체 자신의 참조인데, 객체 자신을 `this` 라고 한다고 한다.

관례적으로 필드와 동일한 이름을 갖는 매개변수를 이런식으로 초기화하여 사용한다고 한다.

## 개선 및 목표

* 일, 월은 여행이 계획되어 있으니 미리 끝내놓자.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jinwon-yoon.gitbook.io/jinonys-blog/daily-log/2022.08.19.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
