public class Constructor
extends java.lang.Object
a constructor declaration consists of a set of fields to be initialized. For example, if a class is defined as:
Class: Foo Field: String a Field: int b Field: BigInteger cThen a constructor declaration of {"a","c"} will conceptually generate the following consturctor:
Foo( String _a, BigInteger _c ) {
a=_a; c=_c;
}
(Only conceptually, because Foo will likely to become an interface
so we can't simply generate a constructor like this.)| Modifier and Type | Field | Description |
|---|---|---|
java.lang.String[] |
fields |
array of field names to be initialized.
|
| Constructor | Description |
|---|---|
Constructor(java.lang.String[] _fields) |
Copyright © 2017 Oracle Corporation. All rights reserved.