From ca9ff4b2f3a96472cab589a2f0d5ad50a5729e31 Mon Sep 17 00:00:00 2001 From: Sarah Haggarty Date: Tue, 18 Jul 2023 14:59:12 +0200 Subject: [PATCH] update: remove headers from tables --- docs/topics/arrays.md | 68 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/docs/topics/arrays.md b/docs/topics/arrays.md index 2ba11cd5e8e..8f3ee1f6b91 100644 --- a/docs/topics/arrays.md +++ b/docs/topics/arrays.md @@ -353,18 +353,70 @@ If you use the `Array` class with primitive values, these values are boxed into As an alternative, you can use these primitive-type arrays, which allow you to store primitives in an array without the side effect of boxing overhead: -| | | | | -|--|--|--|--| -|[`BooleanArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean-array/)|[`ByteArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/)|[`CharArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-array/)|[`DoubleArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double-array/)| -|[`FloatArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/)|[`IntArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/)|[`LongArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long-array/)|[`ShortArray`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short-array/)| + + + + + + + + + + + + + +
+ BooleanArray + + ByteArray + + CharArray + + DoubleArray +
+ FloatArray + + IntArray + + LongArray + + ShortArray +
These classes have no inheritance relation to the `Array` class, but they have the same set of methods and properties. They are equivalent to the following arrays of primitive types in Java: -| | | | | -|-|--|-|-| -|`boolean[]`|`byte[]`|`char[]`|`double[]`| -|`float[]`|`int[]`|`long[]`|`short[]`| + + + + + + + + + + + + + +
+ boolean[] + + byte[] + + char[] + + double[] +
+ float[] + + int[] + + long[] + + short[] +
Here is an example of using a primitive-type array: