Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
b6b9ee20
Commit
b6b9ee20
authored
1 year ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
Adding Array creation of reference type Rectangle
parent
3d60e5bb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/Sd1/Arrays/arrays.xml
+31
-1
31 additions, 1 deletion
Doc/Sd1/Arrays/arrays.xml
with
31 additions
and
1 deletion
Doc/Sd1/Arrays/arrays.xml
+
31
−
1
View file @
b6b9ee20
...
...
@@ -258,7 +258,7 @@ primes[4] = 11;
</figure>
<figure
xml:id=
"sd1_array_fig_arrayInitByValueSet"
>
<title>
O
ne step initialization
</title>
<title>
Primitive data o
ne step initialization
</title>
<para>
Combining array allocation and value assignment:
</para>
...
...
@@ -281,6 +281,36 @@ primes[4] = 11;</programlisting></td>
</informaltable>
</figure>
<figure
xml:id=
"sd1_array_fig_arrayInitReftypeByValueSet"
>
<title>
Reference data one step initialization
</title>
<para>
Combining array allocation and value assignment:
</para>
<informaltable
border=
"0"
>
<colgroup
width=
"45%"
/>
<colgroup
width=
"55%"
/>
<tr>
<td
valign=
"top"
><programlisting
language=
"java"
>
public class Rectangle {
private int width, height;
private boolean hasSolidBorder;
public Rectangle(int width, int height,
boolean hasSolidBorder) {
this.width = width;
this.height = height;
this.hasSolidBorder = hasSolidBorder;
}
}
</programlisting></td>
<td
valign=
"top"
><programlisting
language=
"java"
>
final Rectangle[] rectList = new Rectangle[] {
new Rectangle(2, 5, true),
new Rectangle(4, 1, false)
};
</programlisting></td>
</tr>
</informaltable>
</figure>
<qandaset
defaultlabel=
"qanda"
xml:id=
"sd1QandaArray2html"
>
<title>
Converting string arrays to
<xref
linkend=
"glo_HTML"
/>
.
</title>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment