Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Java or C++, a block statement is a sequence of statements enclosed in { }. You use a block statement whenever you need to put multiple actions in the body of a branch or loop statement.
In Scala, a { } block contains a sequence of expressions, and the result is also an expression. The value of the block is the value of the last expression.