Groovy web console

subscribe to the feed Subscribe
to this
site
Java HelloWorld (via #groovywebconsole)
tweet this snippet Tweet
this
script

Java HelloWorld

Published 2 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
class HelloWorld {    
    public static void main( String[] args ) {
         HelloWorld hw = new HelloWorld()
         
         System.out.println( hw.msg() );
     }
     
     String msg() {
         return "Hello World!";
     } 
}