Java String toCharArray() method

Java String toCharArray() method converts current String into character array.

Syntax:

Returns:

It returns a character array

Java String toCharArray() method example 1

Output:

 Java String toCharArray() Method Example 2

Output:

Java String toCharArray() Method Example 2

Output:

Java String toCharArray() Method Example 3

Output:

Char Array Length :25

Java String toCharArray() Method Example 4

Output:

Leave a Comment