foreach loop a java creation?

前端 未结 5 2097
粉色の甜心
粉色の甜心 2020-12-21 18:34

Why was this loop introduced in java?Is it a java creation? What is its purpose(increases memory/cpu utilisation efficiency)?

5条回答
  •  臣服心动
    2020-12-21 19:02

    It is plain "Syntactic sugar"

    Dont think there is any efficiency improvement.

    Java community wanted the language to be a bit modernized, competing with C# and Ruby..

提交回复
热议问题