+ 1
Hey guys I am not able to understand the below code someone pls explain it."char arr[]=str.toCharArray;
This code of line is based on java
5 Answers
+ 2
it is not a stream,
it just copies the bytes[] of the String and up-casts it to char[]
+ 1
char arr[] = str.toCharArray() ;
This line convert String str into a stream of character and stored in a character array arr, as single individual array of characters of str String.
Ex: str= "abc";
after that line executed
arr[0] = 'a',
arr[1]='b',
arr[2]='c';
Hope it helps...
+ 1
Thank you Jaya Krishna it is helped me lot
0
I means sequence of characters actually.. in general sence.
Yes, there the difference but i thought concept will not affect. No not bother to to modify..
0
Ok thank you guys