I am new to Scala. I am trying to return a value from some scala code in Spark and I also get the function name along with the result. for ex executing below
def getHistory() : Long = {
1 + 1
}
getHistory()
returns
getHistory: ()Long
res140: Long = 2
The additional information that is being returned seems to be a function of REPL as someone mentioned below. How can I turn this feature off so that I only see 2
being returned.
2
, the rest is only some helpful text provided by your REPL. I'm not sure to understand your question.main()
method, compile the file, and invoke the compiled program. Seek out a good beginners tutorial for the details.