The java "Object" Class equivalent in Scala -
it seems good reason need switch scala! so, excuse me if question might seem novice.
it seems any in scala supper class of types , might considered object type equivalent in java. type any abstract, while object not. more concretely, can not write following code in scala (since class abstract , cannot instantiated):
val k:any = new any();
while can write following code in java:
object k=new object();
what should use if need concrete equivalent type of java object type?
anyref type not abstract seems equivalent of java object class (see this)
so following works in scala:
val k:anyref = new anyref();
Comments
Post a Comment