diff --git a/post/from-java-to-scala-scala-collections-hwalyong/index.html b/post/from-java-to-scala-scala-collections-hwalyong/index.html index ece5554..1e31796 100644 --- a/post/from-java-to-scala-scala-collections-hwalyong/index.html +++ b/post/from-java-to-scala-scala-collections-hwalyong/index.html @@ -226,7 +226,7 @@

먼저 예제에서 사용할 데이터 모델을 정의해 보

01. Car 목록에서 모든 brand를 출력해 보자

// Iterative version
 StringBuilder sb = new StringBuilder();
-for (Car car : db.getCars()) {
+for (Car car : sb.getCars()) {
   db.append(car.getBrand()).append(", ");
   String brands = sb.toString().substring(0, sb.length()-2);
 }