How to input a char array in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to input a char array in java?

and how to implement it in gui, too? kindly give at least one source code example

16th May 2019, 4:17 PM
Ahsan Tariq
Ahsan Tariq - avatar
4 Answers
+ 3
in gui you just use a TextField and a Button and just extract the value of the TextField after the button was pressed. happy coding!! 😄
16th May 2019, 5:05 PM
Anton Böhler
Anton Böhler - avatar
16th May 2019, 4:59 PM
Anton Böhler
Anton Böhler - avatar
+ 1
thanks for clarification. :)
16th May 2019, 5:48 PM
Ahsan Tariq
Ahsan Tariq - avatar
0
do you want String s = *input here*; or char[] s = new char[10]; for(int i=0;i<s.length;i++){ s[i] = *input here*; } or something completly diffrent?
16th May 2019, 4:56 PM
Anton Böhler
Anton Böhler - avatar