Arrays.ToString Method

Definition

Overloads

ToString(Int64[])

Returns a string representation of the contents of the specified array.

ToString(Object[])

Returns a string representation of the contents of the specified array.

ToString(Boolean[])

Returns a string representation of the contents of the specified array.

ToString(Byte[])

Returns a string representation of the contents of the specified array.

ToString(Char[])

Returns a string representation of the contents of the specified array.

ToString(Double[])

Returns a string representation of the contents of the specified array.

ToString(Int16[])

Returns a string representation of the contents of the specified array.

ToString(Int32[])

Returns a string representation of the contents of the specified array.

ToString(Single[])

Returns a string representation of the contents of the specified array.

ToString(Int64[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([J)Ljava/lang/String;", "")]
public static string ToString (long[]? a);
[<Android.Runtime.Register("toString", "([J)Ljava/lang/String;", "")>]
static member ToString : int64[] -> string

Parameters

a
Int64[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(long). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(long[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Object[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([Ljava/lang/Object;)Ljava/lang/String;", "")]
public static string ToString (Java.Lang.Object[]? a);
[<Android.Runtime.Register("toString", "([Ljava/lang/Object;)Ljava/lang/String;", "")>]
static member ToString : Java.Lang.Object[] -> string

Parameters

a
Object[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. If the array contains other arrays as elements, they are converted to strings by the Object#toString method inherited from Object, which describes their identities rather than their contents.

The value returned by this method is equal to the value that would be returned by Arrays.asList(a).toString(), unless a is null, in which case "null" is returned.

Added in 1.5.

Java documentation for java.util.Arrays.toString(java.lang.Object[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Boolean[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([Z)Ljava/lang/String;", "")]
public static string ToString (bool[]? a);
[<Android.Runtime.Register("toString", "([Z)Ljava/lang/String;", "")>]
static member ToString : bool[] -> string

Parameters

a
Boolean[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(boolean). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(boolean[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Byte[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([B)Ljava/lang/String;", "")]
public static string ToString (byte[]? a);
[<Android.Runtime.Register("toString", "([B)Ljava/lang/String;", "")>]
static member ToString : byte[] -> string

Parameters

a
Byte[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(byte). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Char[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([C)Ljava/lang/String;", "")]
public static string ToString (char[]? a);
[<Android.Runtime.Register("toString", "([C)Ljava/lang/String;", "")>]
static member ToString : char[] -> string

Parameters

a
Char[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(char). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(char[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Double[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([D)Ljava/lang/String;", "")]
public static string ToString (double[]? a);
[<Android.Runtime.Register("toString", "([D)Ljava/lang/String;", "")>]
static member ToString : double[] -> string

Parameters

a
Double[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(double). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(double[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Int16[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([S)Ljava/lang/String;", "")]
public static string ToString (short[]? a);
[<Android.Runtime.Register("toString", "([S)Ljava/lang/String;", "")>]
static member ToString : int16[] -> string

Parameters

a
Int16[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(short). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(short[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Int32[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([I)Ljava/lang/String;", "")]
public static string ToString (int[]? a);
[<Android.Runtime.Register("toString", "([I)Ljava/lang/String;", "")>]
static member ToString : int[] -> string

Parameters

a
Int32[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(int). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(int[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToString(Single[])

Returns a string representation of the contents of the specified array.

[Android.Runtime.Register("toString", "([F)Ljava/lang/String;", "")]
public static string ToString (float[]? a);
[<Android.Runtime.Register("toString", "([F)Ljava/lang/String;", "")>]
static member ToString : single[] -> string

Parameters

a
Single[]

the array whose string representation to return

Returns

a string representation of a

Attributes

Remarks

Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(float). Returns "null" if a is null.

Added in 1.5.

Java documentation for java.util.Arrays.toString(float[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to