Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

very trivial "while" question  RSS feed

 
FY Hsieh
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
**************************
while (condition)
callMethod_1();
doSomethingMore();
****************************

and

************************
while(condition) {
callMethod_1();
}
doSomethingMore();
***********************

are EAXCTLY the same in terms of compile, runtime execution, correct ?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!