top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Can I use existing Java code from Scala?

+2 votes
335 views
Can I use existing Java code from Scala?
posted Jun 28, 2016 by Shivam Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Accessing Java classes from Scala code is no problem at all. Using a Scala class from Java can get tricky, in particular if your Scala class uses advanced features like generics, polymorphic methods, or abstract types. Since Java doesn't have such language features, you have to know something about the encoding scheme of Scala classes. Otherwise, there should be no problems.

answer Jul 1, 2016 by Karthick.c
...