MyungHoon_Ju

정체성 & 상태 & 행위

Q. 다음은 불변객체일까 가변객체일까?

Q. 다음은 불변객체일까 가변객체일까?

Q. 다음은 불변객체일까 가변객체일까?

  WebPage webPage = new WebPage(“http://localhost:8080”);
  webPage.modify(“< html/>”);


불변과 가변에 대한 물음은 state와 data의 혼동에서 나온다