Java Access String As Array Code Example

Snippet 1

  String str = "example";
char[] ch = str.toCharArray(); 

Snippet 2

  String str = "example";
char[] ch = str.toCharArray();  

Copyright © Code Fetcher 2020

 

 

Published

Leave a comment

Your email address will not be published. Required fields are marked *