5. in Java // HelloWorld.java public class HelloWorld { public static void main(String... args) { System.out.println("Hello, World!"); } } //=> Hello, World! 6. in Groovy // HelloWorld.groovy public class HelloWorld { public static void main(String... args) { System.out.println("Hello, World!"); } } //=> Hello, World! Groovyとしてもvalidなコードなので 拡張子を変えるだけでOK
![Java開発の強力な相棒として今すぐ使えるGroovy](https://cdn-ak-scissors.b.st-hatena.com/image/square/4b12224076eed4464894be6b3d1e30b1299ea036/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fjavagroovy-150411113205-conversion-gate01-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)