Can java run a compiled scala code?

后端 未结 4 1019
囚心锁ツ
囚心锁ツ 2020-12-10 10:16

Can command java run a compiled scala code? If so, why do we have an exclusive command scala?

4条回答
  •  生来不讨喜
    2020-12-10 10:55

    Just want to add my own answer as additional value for the future readers:

    scala, if run without parameter, will run an interactive shell

    scala, if run with a text file name as parameter, will regard the file as a scala script

    those two can't be done using java

提交回复
热议问题