SQL-J Language Reference,
Page 116 of 118


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

NEW

Creates a new instance of the specified class.

Syntax

NEW [ JavaClassName | ClassAlias ]
    ( Expression [ , Expression]* )

You can place a NEW expression anywhere an expression is permitted. It invokes the constructor that matches the types of the expressions in the parameter list.

NEW: The NEW operator works with the new class alias construct. See “CREATE CLASS ALIAS statement”.

In the situation in which a class alias and a Java class name shared the same name, Cloudscape finds the Java class name first.

Example

INSERT INTO People VALUES (50, NEW JBMSTours.serializabletypes.Person(
    'George', 'Washington'))
-- Person is a ClassAlias
INSERT INTO People VALUES (50, NEW Person(
    'George', 'Washington'))

For information on method resolution, see “Method Resolution and Type Correspondence”.

[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.