Using Java Generics in Scala -


when integrating java library scala codebase, running following error when uisng 1 of generic objects java scala.

val myobject<someotherclass>  = myobject.factorymethod() 

above code gives compilation error because not valid scala statement.

how can use java generic objects in scala codebase.

val myobject: myobject[t] = myobject.factorymethod () 

would scala-syntax. note objects written in lower case. type inference might solve issue without giving type explicitly, might idea documentation reasons specify though, , error, if reasoning wrong.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

python - cx_oracle unable to find Oracle Client -