Skip to main content

All Questions

Tagged with
0 votes
0 answers
55 views

How to write scala jar executable by Java to fetch hostname of the machine?

I want to perform this activity in Scala and execute it with Java: hostname -i The scala code for this is: import java.net._ object HostName { def main(args: Array[String]){ val ...
Aviral Srivastava's user avatar
13 votes
1 answer
2k views

How do I alias the scala setter method 'myvar_$eq(myval)' to something more pleasing when in java?

I've been converting some code from java to scala lately trying to teach myself the language. Suppose we have this scala class: class Person() { var name:String = "joebob" } Now I want to access ...
eyberg's user avatar
  • 3,230