Download Scala Tutorial (PDF Version) - Tutorials Point
Download Scala Tutorial (PDF Version) - Tutorials Point
Download Scala Tutorial (PDF Version) - Tutorials Point
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Flow Diagram:<br />
Example:<br />
object Test {<br />
def main(args: Array[String]) {<br />
// Local variable declaration:<br />
var a = 10;<br />
}<br />
}<br />
// do loop execution<br />
do{<br />
println( "Value of a: " + a );<br />
a = a + 1;<br />
}while( a < 20 )<br />
When the above code is compiled and executed, it produces the following result:<br />
C:/>scalac Test.scala<br />
C:/>scala Test<br />
value of a: 10<br />
value of a: 11<br />
value of a: 12<br />
value of a: 13<br />
value of a: 14<br />
value of a: 15<br />
value of a: 16<br />
value of a: 17<br />
value of a: 18<br />
value of a: 19<br />
C:/><br />
TUTORIALS POINT<br />
Simply Easy Learning