How JVM distinguish between Scala bytecode and Java bytecode?

Viewed 2821

As Scala also produces bytecode and executed by JVM. I am wondering How JVM distinguish between Scala bytecode and Java bytecode. Can anyone please explain?

 Scalac Myprogram.scala
 java Myprogram

So this statements are perfectly fine?

6 Answers
Related