Java And Javascript Difference Code Example

Snippet 1
  java is virtualised and compiled while javascript isn't.
javascript and java aren't that similar apart from beign 
both OOP. 
Snippet 2
  The scripts. 
Snippet 3
  print("hello")