Array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Array

How to make array for char

26th Jan 2020, 8:05 AM
Nur Aliya
3 Answers
+ 3
Some examples in Java (you seem to have started the Java course) char[] letters = new char[3]; char[] letters2 = new char[] {'a', 'b', 'c'}; char[] letters3 = "abc".toCharArray();
26th Jan 2020, 8:50 AM
Tibor Santa
Tibor Santa - avatar
+ 2
Just like you make for strings. Replace the double quotes with single quote. For eg- "a" to 'a' https://www.sololearn.com/learn/Java/2148/
26th Jan 2020, 8:31 AM
Avinesh
Avinesh - avatar
+ 2
Please specify a language in your question tags. Unfortunately, 'help me' did not clarify the context of the question, in regards to languages involved : )
26th Jan 2020, 8:47 AM
Ipang