Learn scala in simple way
@
#
>:
<%
<:
<-
=>
=
:
-
abstract
case
catch
class
def
do
else
extends
false
final
finally
for
forSome
if
implicit
import
lazy
match
new
Null
object
override
package
private
protected
return
sealed
super
this
throw
trait
Try
true
type
val
Var
while
with
yield
type 1 :
/** This is a comment in scala defined autor kusha b k **/
type 2 :
// this line is comment in scala defined by autor
type 1:
import kushabk._ // all members of kushabk
type 2:
import kusha.b //the member b of kusha
type 3:
import kusha.b.k
type 4:
import kusha.{b,k}
syntax 1
var Int_variable_name
Syntax 2
var Int_variable_name = initialization_value
examples
var myIntvalue
var myIntvalueInit = 100
syntax 1
var double_variable_name
Syntax 2
var double_variable_name = initialization_value
examples
var mydoubletvalue
var mydoublevalueInit = 100.0
syntax 1
var float_variable_name
Syntax 2
var float_variable_name = initialization_value
examples
var myfloat
var myfloatvalueInit = 100.0f
syntax 1
var string_variable_name
Syntax 2
var string_variable_name = "initialization_value"
examples
var mystring
var mystringvalueInit = "Hellow String world by kusha"
syntax 1
var char_variable_name
Syntax 2
var char_variable_name = 'initialization_value '
examples
var mychar
var mycharvalueInit = 'K'
println("This is my output")
syntax 1:
var variable_name:Array[array_type] = new Array[array_type] (size_of_array)
example
var k:Array[String] = new Array[String](10)
def thisismyfunctionname(myintvariable: Int) = { myintvariable * myintvariable }