+ 2

How to store and print any string using array. Input will user defined.

15th Jun 2019, 8:22 AM
Shikhar Verma
Shikhar Verma - avatar
2 Answers
+ 9
Store String from the user Example Here we assum that we are created scanner object for input from the user. String a = obj.nextLine(); Print using enached for loop for(String i : a) Print(i);
15th Jun 2019, 10:45 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 1
use an array in what way? do you want a character array storing all the characters of the string or do you want an array storing multiple string or something else? maybe give one or two exemples of what you are trying to achieve. happy code! 😄
15th Jun 2019, 9:40 AM
Anton Böhler
Anton Böhler - avatar