Stream과 for-loop의 차이점을 설명해보세요. #98
Sung-june27
started this conversation in
Java
Replies: 2 comments
-
|
for-loop는 반복을 어떻게 처리할지 직접 제어하는 명령형 방식이고, for-loop는 단순하고 성능 예측이 쉬운 반면, |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
가장 큰 차이점은 제어의 주체와 코드의 목적성에 있습니다. for-loop는 개발자가 인덱스나 반복을 직접 관리하는 외부 방식인 반면 for-loop는 로직 내에서 break나 continue를 사용해 흐름을 세밀하게 제어하거나 지역변수를 수정하기에 용이합니다. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
.
Beta Was this translation helpful? Give feedback.
All reactions