From Java to Groovy: How to Handle "String myArray []"

I tried to compile Java files using the groovyc command. When he gets in

public static void main (String myArray [])

which is in the Java file, the compiler says:

unexpected token: [@line xxxxx

how can I deal with this situation in general - can it be many cases in Java files?

thanks.

+4
source share
1 answer

It's simple

public static void main(String[] myArray) 

or (more groovy)

 static main(myArray) 
+5
source

Source: https://habr.com/ru/post/1337480/


All Articles