In Java we have exec() method for opening system applications. In groovy this is more easier than Java. This is groovier way for opening notepad application.
When you called the execute() method on String object, Groovy created the instance that extends java.lang.Process , just like exec() method of RunTime did in the Java code. You can verify this by using following code.
This will print "java.lang.Process"