Click here to watch in Youtube :
https://www.youtube.com/watch?v=WSC-AXsho9E&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java String [toCharArray() method] |
/* * public char[] toCharArray() * * * Returns: * -------- * * a newly allocated character array whose length is the * length of this string and whose contents are * initialized to contain the character sequence * represented by this string. */ public class ToCharArrayDemo { public static void main(String[] args) { String str = "Welcome"; char[] charArray = str.toCharArray(); for (char c : charArray) { System.out.println(c); } } }
W e l c o m e
https://sites.google.com/site/javaee4321/java/StringDemo_toCharArray_App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/StringDemo_toCharArray_App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/89dfdef018d2970576505c9f498b5e4f28628c35/BasicJava/StringDemo_toCharArray_App/?at=master
See also:
No comments:
Post a Comment