Monday, 21 September 2020

Scala: Create java.lang.Object instance

var obj1 = new Object

Above snippet creates new instance of java.lang.Object.

scala> var obj1 = new Object
var obj1: Object = java.lang.Object@72f3f14c

scala> 

scala> var obj2 = new Object
var obj2: Object = java.lang.Object@49bb808f

 

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment