Imports¶
There are four different variants of imports: the first two are very similar to classic imports you have in Java, while the second are similar to the static imports, just a bit more flexible.
Import of a type¶
This is very similar to Java, except for the missing semicolon:
import java.util.Collections
Differently from Java it is possible to define an alias:
import java.util.Collections as Coll
Import single element¶
A few examples:
import java.lang.System.out
import java.lang.System.out.println
import java.lang.System.out.println as print