Constructor calls

Syntax

className.new(arguments)

where:

Description

A Java instance can be created by calling the public constructor of a Java class. The call is performed using the "new" keyword, as if a static method of the class was called.

The class may be referenced using a qualified name (dotted notation including the package name) or using a simple name. When a simple name is used, the referenced class is first searched in the current package. If the class is not found, then it is resolved using the defined import statements.

The referenced constructor must be public. The referenced class must be public and concrete.

Examples

// Create a Properties instance
properties = java.util.Properties.new(); 

// Create a ZipFile instance
var zip : java.util.zip.ZipFile = java.util.zip.ZipFile.new("myFile.zip");