scala variable understand:
package com.cxy.scala object Hello { def main(args: Array[String]): Unit = { println("hello") val age: Int =20; val a :Short =10 val b :Long =20 val c : Float=20f val d : Double=20 var bln : Boolean =true var cha : Char ='2' var ii :Integer =20 var bb :Byte =20 } }
scala is a fully object-oriented language, so he did not have the basic data types, so 20 is a target of the scala
In java
This is no way of
In the scala:
There are ways of
The data type java
into the scala value type and reference types