New (Arraylist constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b><section begin=dpl_desc/>Create new Arraylist instance<section end=dpl_desc/></b></span>
{{Template:Arraylist:New subtitle}}
[[Category:Arraylist methods|New constructor]]
<!--DPL?? Category:Arraylist methods|New constructor: Create new Arraylist instance-->
<p>
New is a member of the [[Arraylist class]].
</p>


This method returns a new instance of an Arraylist.
This method returns a new instance of an Arraylist.
===Syntax===
==Syntax==
  %arrayl = New
{{Template:Arraylist:New syntax}}
====Syntax Terms====
===Syntax terms===
<dl>
<dl>
<dt><i>%arrayl</i>
<dt><i>%arrayl</i>
Line 15: Line 10:


</dl>
</dl>
===Usage Notes===
==Usage notes==
<ul>
<ul>
<li>New is a constructor and as such can be called with no method
<li>New is a constructor and as such can be called with no method
Line 34: Line 29:
</pre>
</pre>
</ul>
</ul>
==See also==
{{Template:Arraylist:New footer}}

Revision as of 20:10, 15 March 2011

Create a new Arraylist object (Arraylist class)


This method returns a new instance of an Arraylist.

Syntax

%al = [%(Arraylist Of itemType):]New

Syntax terms

%arrayl
An Arraylist object that is set to a new Arraylist object reference.

Usage notes

  • New is a constructor and as such can be called with no method object, with an explicit class name, or with an object variable, even if that object is null:
        %arrayl = new
        %arrayl = %(Arraylist):new
        %arrayl = %arrayl:new
    
    note

    When using the second of these syntax options of New, which explicitly indicates the class, both the collection and item datatypes must be specified just as they are on the collection variable's declaration:

        %arrayl  is collection Arraylist of longstring
        %arrayl  = %(Arraylist of longstring):new
    

See also