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);
}
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