Quantcast
Channel: while
Viewing all articles
Browse latest Browse all 10

Scala control structure examples (if/then, match/case, for, while, try/catch)

$
0
0
Scala control structure examples (if/then, match/case, for, while, try/catch) alvin September 28, 2014 - 6:43pm

This post contains a collection of Scala control structures examples. I initially created most of these in the process of writing the Scala Cookbook. Unlike the Cookbook, I don’t describe them much here, I just show the examples, mostly as a reference for myself (and anyone else that can benefit from them).

if/then control structures:

Here are some examples of the Scala if/then control structure:


Viewing all articles
Browse latest Browse all 10

Trending Articles