Monday, August 13, 2018

Multiple variable initialization with Scala

Scala has good facility to initialize mulitple variables at a same time.

Please go throught below example it is pretty straight forward just copy and paste it and run it.

For basic steps like creation of class please follow first two steps of below example

https://sagarthakare1.wordpress.com/2015/04/17/scala-hello-world-example-with-object-class/

package com.sagar.basic

object MultipleVariableIntialisation extends App{
private val a,b,c=2;
println("Value of a:"+a);
println("Value of b:"+b);
println("Value of c:"+c);

}

No comments:

Post a Comment

How to check whether operating system is 64 bit or 32bit?

What is 32 and 64 bit operating system? The terms 32-bit and 64-bit refer to the way a computer's processor that is CPU, handles info...