Skip to content

Commit

Permalink
GITBOOK-184: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenPearls authored and gitbook-bot committed Nov 7, 2024
1 parent 21c2fb2 commit 7ebeaa4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@ public void plantEnumMapTest() {

> `์ƒํƒœ ์ „์ด(Transition)`๋ฅผ Enum์œผ๋กœ ๊ด€๋ฆฌํ•  ๋•Œ, ์—ด๊ฑฐํ˜• Enum ๊ฐ„์˜ ์ „์ด ์ƒํƒœ๋ฅผ ์ค‘์ฒฉ๋œ `EnumMap`์„ ํ†ตํ•ด ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค. 
### **1) `ordinal()`์„ ์ด์šฉํ•œ 2์ฐจ์› ๋ฐฐ์—ด ์ธ๋ฑ์Šค ์˜ˆ์ œ**java์ฝ”๋“œ ๋ณต์‚ฌenum Phase {
### **1) `ordinal()`์„ ์ด์šฉํ•œ 2์ฐจ์› ๋ฐฐ์—ด ์ธ๋ฑ์Šค ์˜ˆ์ œ**

```java
SOLID, LIQUID, GAS;
enum Phase {
SOLID, LIQUID, GAS;

enum Transition {
MELT, FREEZE, BOIL, CONDENSE, SUBLIME, DEPOSIT;
Expand Down Expand Up @@ -174,7 +175,7 @@ public void plantEnumMapTest() {

2์ฐจ์› ๋ฐฐ์—ด ๋Œ€์‹  `EnumMap`์„ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค.

> 2์ค‘ ์ค‘์ฒฉ์ฒฉ
> 2์ค‘ ์ค‘์ฒฉ
```java
import java.util.*;
Expand Down

0 comments on commit 7ebeaa4

Please sign in to comment.