Monday, 30 May 2016

loops


Types of loops

for(initialization;termination;update):
1)initialization allows only assignment.
2)termination condition must return a boolean.
3)update: allows assignment, pre- and post operations, and method call, even new class instances; but logic comparing is allowed.

for(element:collection):
for(Iterator it;it has next)

do{}while(termination);
while(termination){do};

Keyword:
break: quite from the whole of loop.
continue:quite from current iteration.

Note: 1) 'break' used only in switch and loop; 2) 'continue' only used in the loop.




No comments:

Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...