Skip to content

Conversation

8parks
Copy link

@8parks 8parks commented Oct 4, 2025

2025.10.04. 1주차 과제
1단계 - 홈 화면
2단계 - 예약 조회

Copy link

@juanxiu juanxiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

미션하느라 고생하셨습니다! 전반적으로 잘 구성하였습니다. 리뷰 답글 부탁드립니다~

private List<Reservation> reservations = new ArrayList<>();

public ReservationController() {
reservations.add(new Reservation(1L, "브라운", "2023-01-01", "10:00"));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add()로 초기 데이터를 넣으면 리스트가 mutable 상태가 됩니다.
테스트용 고정 데이터라면 List.of()로 불변 리스트로 선언해도 좋을 것 같아요. 선택은 자유입니다. 혹시 가변 리스트 생성을 한 특별한 이유가 있을까요?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 감사합니다! 특별한 이유는 따로 없고, List.of()으로 쓰는 것을 생각하지 못했습니다..ㅎㅎ 개인적으로 ArrayList가 제일 익숙하기도 하고 직전에 컨트롤러 CRUD 실습을 했어서 ArrayList로 그냥 자연스럽게 썼던 것 같아요. 다음에는 이런 부분도 더 신경 써보겠습니다!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants