summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/html/k100026.html
blob: 92eec4a96b7b01843382e488c853ebd5f5f85473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<html>
<head>
<title>
Handbuch der Java-Programmierung, 5. Auflage
</title>
</head>
<body>
<a name="startofbody"></a>
<script language="JavaScript" src="hjp4lib.js">
</script>
<script language="JavaScript">
installKbdHandler("97,#startofbody;101,#endofbody;116,cover.html;122,k100003.html;115,search.html;105,index.html;100,JDKDOCS;112,APIDOCS;104,k100022.html;106,k100025.html;107,k100027.html;108,k100030.html");
</script>
<table border=0 cellpadding=0 cellspacing=1 width="100%">
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="cover.html">&nbsp;Titel&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100003.html">&nbsp;Inhalt&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="search.html">&nbsp;Suchen&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="index.html">&nbsp;Index&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/index.html" onClick="this.href=getDocIndex()">&nbsp;DOC&nbsp;</a>
<td align="right">Handbuch der Java-Programmierung, 5. Auflage
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100022.html">&nbsp;&lt;&lt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100025.html">&nbsp;&nbsp;&lt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100027.html">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100030.html">&nbsp;&gt;&gt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/api/index.html" onClick="this.href=getApiIndex()">&nbsp;API&nbsp;</a>
<td align="right">Kapitel 4 - Datentypen
</table>
<hr>


<!-- Section -->
<a name="arrays"></a>
<h2>4.4 Arrays<a name="ixa100297"></a> </h2>
<hr>
<ul>
<li><a href="k100026.html#arrays">4.4 Arrays</a>
<ul>
<li><a href="k100026.html#sectlevel3id004004001">4.4.1 Deklaration und Initialisierung</a>
<li><a href="k100026.html#sectlevel3id004004002">4.4.2 Zugriff auf Array-Elemente</a>
<li><a href="k100026.html#mehrdimarrays">4.4.3 Mehrdimensionale Arrays</a>
</ul>
</ul>
<hr>

<p>
Arrays in Java unterscheiden sich dadurch von Arrays in anderen Programmiersprachen,
dass sie <i>Objekte</i> sind. Obwohl dieser Umstand in vielen F&auml;llen
vernachl&auml;ssigt werden kann, bedeutet er dennoch: 
<ul>
<li>dass Array-Variablen <i>Referenzen</i> sind
<li>dass Arrays Methoden und Instanz-Variablen besitzen
<li>dass Arrays zur Laufzeit erzeugt werden
</ul>
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top width=1000>

<p>
Dennoch bleibt ein Array immer eine (m&ouml;glicherweise mehrdimensionale)
Reihung von Elementen eines festen Grundtyps. Arrays in Java sind
<i>semi-dynamisch</i>, d.h. ihre Gr&ouml;&szlig;e kann zur Laufzeit
festgelegt, sp&auml;ter aber nicht mehr ver&auml;ndert werden.</td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top>
<table border=0 cellspacing=0 cellpadding=1 width=100% bgcolor="#000077">
<tr>
<td><font color="#FFFFFF">&nbsp;Hinweis&nbsp;</font></td>
</tr>
</table>
</td>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
</tr>
</table>


<!-- Section -->
<a name="sectlevel3id004004001"></a>
<h3>4.4.1 Deklaration und Initialisierung </h3>

<p>
Die Deklaration eines Arrays in Java erfolgt in zwei Schritten: 
<ul>
<li>Deklaration einer Array-Variablen
<li>Erzeugen eines Arrays und Zuweisung an die Array-Variable
</ul>

<p>
Die Deklaration eines Arrays entspricht syntaktisch der einer einfachen
Variablen, mit dem Unterschied, dass an den Typnamen eckige Klammern
angeh&auml;ngt werden: 
<a name="listingid004004"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#006699">int</font>[] a;
<font color="#555555">002 </font><font color="#006699">double</font>[] b;
<font color="#555555">003 </font><font color="#006699">boolean</font>[] c;</pre>
</font>
</td>
</tr>
</table>
<i>
Listing 4.4: Deklaration von Arrays</i></p>
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top width=1000>

<p>
Wahlweise k&ouml;nnen die eckigen Klammern auch hinter den Variablennamen
geschrieben werden, aber das ist ein Tribut an die Kompatibilit&auml;t
zu C/C++ und sollte in neuen Java-Programmen vermieden werden.</td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top>
<table border=0 cellspacing=0 cellpadding=1 width=100% bgcolor="#000077">
<tr>
<td><font color="#FFFFFF">&nbsp;Hinweis&nbsp;</font></td>
</tr>
</table>
</td>
<td width=1 align=left valign=top bgcolor="#000077"><img src="trp1_1.gif"></td>
</tr>
</table>

<p>
Zum Zeitpunkt der Deklaration wird noch nicht festgelegt, wie viele
Elemente das Array haben soll. Dies geschieht erst sp&auml;ter bei
seiner Initialisierung, die mit Hilfe des <a name="ixa100298"><a href="index_n.html#ixb100089"><font color=#000080><tt>new</tt></font></a></a>-Operators
oder durch Zuweisung eines Array-Literals ausgef&uuml;hrt wird. Sollen
also beispielsweise die oben deklarierten Arrays 5, 10 und 15 Elemente
haben, w&uuml;rden wir das Beispiel wie folgt erweitern: 
<a name="listingid004005"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font>a = <font color="#0000AA">new</font> <font color="#006699">int</font>[5];
<font color="#555555">002 </font>b = <font color="#0000AA">new</font> <font color="#006699">double</font>[10];
<font color="#555555">003 </font>c = <font color="#0000AA">new</font> <font color="#006699">boolean</font>[15];</pre>
</font>
</td>
</tr>
</table>
<i>
Listing 4.5: Erzeugen von Arrays</i></p>

<p>
Ist bereits zum Deklarationszeitpunkt klar, wie viele Elemente das
Array haben soll, k&ouml;nnen Deklaration und Initialisierung zusammen
geschrieben werden: 
<a name="listingid004006"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#006699">int</font>[] a = <font color="#0000AA">new</font> <font color="#006699">int</font>[5];
<font color="#555555">002 </font><font color="#006699">double</font>[] b = <font color="#0000AA">new</font> <font color="#006699">double</font>[10];
<font color="#555555">003 </font><font color="#006699">boolean</font>[] c = <font color="#0000AA">new</font> <font color="#006699">boolean</font>[15];</pre>
</font>
</td>
</tr>
</table>
<i>
Listing 4.6: Deklaration und Initialisierung von Arrays</i></p>

<p>
Alternativ zur Verwendung des <a href="index_n.html#ixb100089"><font color=#000080><tt>new</tt></font></a>-Operators
kann ein Array auch <i>literal</i> initialisiert werden<a name="ixa100299"></a>.
Dazu werden die Elemente des Arrays in geschweifte Klammern gesetzt
und nach einem Zuweisungsoperator zur Initialisierung verwendet. Die
Gr&ouml;&szlig;e des Arrays ergibt sich aus der Anzahl der zugewiesenen
Elemente: 
<a name="listingid004007"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#006699">int</font>[] x = {1,2,3,4,5};
<font color="#555555">002 </font><font color="#006699">boolean</font>[] y = {<font color="#006699">true</font>, <font color="#006699">true</font>};</pre>
</font>
</td>
</tr>
</table>
<i>
Listing 4.7: Initialisierung mit literalen Arrays</i></p>

<p>
Das Beispiel generiert ein <a href="index_i.html#ixb100244"><font color=#000080><tt>int</tt></font></a>-Array
<font color="#000077"><tt>x</tt></font> mit f&uuml;nf Elementen und
ein <a href="index_b.html#ixb100072"><font color=#000080><tt>boolean</tt></font></a>-Array
<font color="#000077"><tt>y</tt></font> mit zwei Elementen. Anders
als bei der expliziten Initialisierung mit <a href="index_n.html#ixb100089"><font color=#000080><tt>new</tt></font></a>
muss die Initialisierung in diesem Fall unmittelbar bei der Deklaration
erfolgen. 

<!-- Section -->

<a name="sectlevel3id004004002"></a>
<h3>4.4.2 Zugriff auf Array-Elemente </h3>

<p>
Bei der Initialisierung eines Arrays von <font color="#000077"><tt>n</tt></font>
Elementen werden die einzelnen Elemente von <font color="#000077"><tt>0</tt></font>
bis <font color="#000077"><tt>n-1</tt></font> durchnummeriert. Der
Zugriff auf jedes einzelne Element erfolgt &uuml;ber seinen numerischen
Index, der nach dem Array-Namen in eckigen Klammern geschrieben wird.
Das nachfolgende Beispiel deklariert zwei Arrays mit Elementen des
Typs <a href="index_i.html#ixb100244"><font color=#000080><tt>int</tt></font></a>
bzw. <a href="index_b.html#ixb100072"><font color=#000080><tt>boolean</tt></font></a>,
die dann ausgegeben werden: 
<a name="listingid004008"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#00AA00">/* Listing0408.java */</font>
<font color="#555555">002 </font>
<font color="#555555">003 </font><font color="#0000AA">public</font> <font color="#0000AA">class</font> Listing0408
<font color="#555555">004 </font>{
<font color="#555555">005 </font>  <font color="#0000AA">public</font> <font color="#0000AA">static</font> <font color="#006699">void</font> main(String[] args)
<font color="#555555">006 </font>  {
<font color="#555555">007 </font>    <font color="#006699">int</font>[] prim = <font color="#0000AA">new</font> <font color="#006699">int</font>[5];
<font color="#555555">008 </font>    <font color="#006699">boolean</font>[] b = {<font color="#006699">true</font>,<font color="#006699">false</font>};
<font color="#555555">009 </font>    prim[0] = 2;
<font color="#555555">010 </font>    prim[1] = 3;
<font color="#555555">011 </font>    prim[2] = 5;
<font color="#555555">012 </font>    prim[3] = 7;
<font color="#555555">013 </font>    prim[4] = 11;
<font color="#555555">014 </font>
<font color="#555555">015 </font>    System.out.println(<font color="#0000FF">"prim hat "</font>+prim.length+<font color="#0000FF">" Elemente"</font>);
<font color="#555555">016 </font>    System.out.println(<font color="#0000FF">"b hat "</font>+b.length+<font color="#0000FF">" Elemente"</font>);
<font color="#555555">017 </font>    System.out.println(prim[0]);
<font color="#555555">018 </font>    System.out.println(prim[1]);
<font color="#555555">019 </font>    System.out.println(prim[2]);
<font color="#555555">020 </font>    System.out.println(prim[3]);
<font color="#555555">021 </font>    System.out.println(prim[4]);
<font color="#555555">022 </font>    System.out.println(b[0]);
<font color="#555555">023 </font>    System.out.println(b[1]);
<font color="#555555">024 </font>  }
<font color="#555555">025 </font>}</pre>
</font>
</td>
<td valign=top align=right>
<a href="../examples/Listing0408.java"><font color="#000055" size=-1>Listing0408.java</font></a></td>
</tr>
</table>
<i>
Listing 4.8: Deklaration und Zugriff auf Arrays</i></p>

<p>
Die Ausgabe des Programms ist: 
<font color="#333300">
<pre>
prim hat 5 Elemente
b hat 2 Elemente
2
3
5
7
11
true
false
</pre>
</font>
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=1 align=left valign=top bgcolor="#0099CC"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=1></td>
<td width=1 align=left valign=top bgcolor="#0099CC"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top width=1000>

<p>
Der Array-Index muss vom Typ <a href="index_i.html#ixb100244"><font color=#000080><tt>int</tt></font></a>
sein. Aufgrund der vom Compiler automatisch vorgenommenen Typkonvertierungen
sind auch <a href="index_s.html#ixb100243"><font color=#000080><tt>short</tt></font></a>,
<a href="index_b.html#ixb100242"><font color=#000080><tt>byte</tt></font></a>
und <a href="index_c.html#ixb100215"><font color=#000080><tt>char</tt></font></a>
zul&auml;ssig. Jedes Array hat eine Instanzvariable <a name="ixa100300"><a href="index_l.html#ixb100275"><font color=#000080><tt>length</tt></font></a></a>,
die die Anzahl seiner Elemente angibt. Indexausdr&uuml;cke werden
vom Laufzeitsystem auf Einhaltung der Array-Grenzen gepr&uuml;ft.
Sie m&uuml;ssen gr&ouml;&szlig;er gleich 0 und kleiner als <a href="index_l.html#ixb100275"><font color=#000080><tt>length</tt></font></a>
sein.</td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top>
<table border=0 cellspacing=0 cellpadding=1 width=100% bgcolor="#0099CC">
<tr>
<td><font color="#FFFFFF">&nbsp;Tipp&nbsp;</font></td>
</tr>
</table>
</td>
<td width=1 align=left valign=top bgcolor="#0099CC"><img src="trp1_1.gif"></td>
</tr>
</table>


<!-- Section -->
<a name="mehrdimarrays"></a>
<h3>4.4.3 <a name="ixa100301">Mehrdimensionale Arrays</a><a name="ixa100302"></a></h3>

<p>
Mehrdimensionale Arrays werden erzeugt, indem zwei oder mehr Paare
eckiger Klammern bei der Deklaration angegeben werden. Mehrdimensionale
Arrays werden als Arrays von Arrays angelegt. Die Initialisierung
erfolgt analog zu eindimensionalen Arrays durch Angabe der Anzahl
der Elemente je Dimension. 

<p>
Der Zugriff auf mehrdimensionale Arrays geschieht durch Angabe aller
erforderlichen Indizes, jeweils in eigenen eckigen Klammern. Auch
bei mehrdimensionalen Arrays kann eine literale Initialisierung durch
Schachtelung der Initialisierungssequenzen erreicht werden. Das folgende
Beispiel erzeugt ein Array der Gr&ouml;&szlig;e 2 * 3 und gibt dessen
Elemente aus: 
<a name="listingid004009"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#00AA00">/* Listing0409.java */</font>
<font color="#555555">002 </font>
<font color="#555555">003 </font><font color="#0000AA">public</font> <font color="#0000AA">class</font> Listing0409
<font color="#555555">004 </font>{
<font color="#555555">005 </font>  <font color="#0000AA">public</font> <font color="#0000AA">static</font> <font color="#006699">void</font> main(String[] args)
<font color="#555555">006 </font>  {
<font color="#555555">007 </font>    <font color="#006699">int</font>[][] a = <font color="#0000AA">new</font> <font color="#006699">int</font>[2][3];
<font color="#555555">008 </font>
<font color="#555555">009 </font>    a[0][0] = 1;
<font color="#555555">010 </font>    a[0][1] = 2;
<font color="#555555">011 </font>    a[0][2] = 3;
<font color="#555555">012 </font>    a[1][0] = 4;
<font color="#555555">013 </font>    a[1][1] = 5;
<font color="#555555">014 </font>    a[1][2] = 6;
<font color="#555555">015 </font>    System.out.println(<font color="#0000FF">""</font>+a[0][0]+a[0][1]+a[0][2]);
<font color="#555555">016 </font>    System.out.println(<font color="#0000FF">""</font>+a[1][0]+a[1][1]+a[1][2]);
<font color="#555555">017 </font>  }
<font color="#555555">018 </font>}</pre>
</font>
</td>
<td valign=top align=right>
<a href="../examples/Listing0409.java"><font color="#000055" size=-1>Listing0409.java</font></a></td>
</tr>
</table>
<i>
Listing 4.9: Zugriff auf mehrdimensionale Arrays</i></p>

<p>
Die Ausgabe des Programms ist: 
<font color="#333300">
<pre>
123
456
</pre>
</font>
<p>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td width=1 align=left valign=top bgcolor="#0099CC"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=1></td>
<td width=1 align=left valign=top bgcolor="#0099CC"><img src="trp1_1.gif"></td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top width=1000>

<p>
Da mehrdimensionale Arrays als geschachtelte Arrays gespeichert werden,
ist es auch m&ouml;glich, <i>nicht-rechteckige</i> Arrays zu erzeugen.
Das folgende Beispiel deklariert und initialisiert ein zweidimensionales
dreieckiges Array und gibt es auf dem Bildschirm aus. Gleichzeitig
zeigt es die Verwendung der <a href="index_l.html#ixb100275"><font color=#000080><tt>length</tt></font></a>-Variable,
um die Gr&ouml;&szlig;e des Arrays oder Sub-Arrays herauszufinden.</td>
<td><img src="trp1_1.gif" width=2></td>
<td valign=top>
<table border=0 cellspacing=0 cellpadding=1 width=100% bgcolor="#0099CC">
<tr>
<td><font color="#FFFFFF">&nbsp;Tipp&nbsp;</font></td>
</tr>
</table>
</td>
<td width=1 align=left valign=top bgcolor="#0099CC"><img src="trp1_1.gif"></td>
</tr>
</table>
<a name="listingid004010"></a>

<p>
<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#DDDDDD">
<tr>
<td valign=top>
<font color="#000055">
<pre>
<font color="#555555">001 </font><font color="#00AA00">/* Listing0410.java */</font>
<font color="#555555">002 </font>
<font color="#555555">003 </font><font color="#0000AA">public</font> <font color="#0000AA">class</font> Listing0410
<font color="#555555">004 </font>{
<font color="#555555">005 </font>  <font color="#0000AA">public</font> <font color="#0000AA">static</font> <font color="#006699">void</font> main(String[] args)
<font color="#555555">006 </font>  {
<font color="#555555">007 </font>    <font color="#006699">int</font>[][] a = { {0},
<font color="#555555">008 </font>                  {1,2},
<font color="#555555">009 </font>                  {3,4,5},
<font color="#555555">010 </font>                  {6,7,8,9}
<font color="#555555">011 </font>                 };
<font color="#555555">012 </font>    <font color="#0000AA">for</font> (<font color="#006699">int</font> i=0; i&lt;a.length; ++i) {
<font color="#555555">013 </font>      <font color="#0000AA">for</font> (<font color="#006699">int</font> j=0; j&lt;a[i].length; ++j) {
<font color="#555555">014 </font>        System.out.print(a[i][j]);
<font color="#555555">015 </font>      }
<font color="#555555">016 </font>      System.out.println();
<font color="#555555">017 </font>    }
<font color="#555555">018 </font>  }
<font color="#555555">019 </font>}</pre>
</font>
</td>
<td valign=top align=right>
<a href="../examples/Listing0410.java"><font color="#000055" size=-1>Listing0410.java</font></a></td>
</tr>
</table>
<i>
Listing 4.10: Ein nicht-rechteckiges Array</i></p>

<p>
Die Arbeitsweise des Programms ist trotz der erst in <a href="k100040.html#kapitelanweisungen">Kapitel 6</a>
vorzustellenden <a href="index_f.html#ixb100078"><font color=#000080><tt>for</tt></font></a>-Schleife
unmittelbar verst&auml;ndlich. Die Ausgabe des Programms lautet: 
<font color="#333300">
<pre>
0
12
345
6789
</pre>
</font>
<hr>
<table border=0 cellpadding=0 cellspacing=1 width="100%">
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="cover.html">&nbsp;Titel&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100003.html">&nbsp;Inhalt&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="search.html">&nbsp;Suchen&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="index.html">&nbsp;Index&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/index.html" onClick="this.href=getDocIndex()">&nbsp;DOC&nbsp;</a>
<td align="right">Handbuch der Java-Programmierung, 5. Auflage, Addison
Wesley, Version 5.0.1
<tr bgcolor="#EEFFCC">
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100022.html">&nbsp;&lt;&lt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100025.html">&nbsp;&nbsp;&lt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100027.html">&nbsp;&nbsp;&gt;&nbsp;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="k100030.html">&nbsp;&gt;&gt;&nbsp;</a>
<td width="7%" align=center bgcolor="#DDCC99"><a href="../jdkdocs/api/index.html" onClick="this.href=getApiIndex()">&nbsp;API&nbsp;</a>
<td align="right">&copy; 1998, 2007 Guido Kr&uuml;ger &amp; Thomas
Stark, <a href="http://www.javabuch.de">http://www.javabuch.de</a>
</table>
<a name="endofbody"></a>
</body>
</html>