0
How to assign array index to an input string in java?
For example Laptop // is entered as an input. a=sc.nextLine() I want a[0]=L a[1]=a a[2]=p . . .
1 ответ
+ 3
There are many ways.
The easiest would be:
char[] arr = a.toCharArray();
For example Laptop // is entered as an input. a=sc.nextLine() I want a[0]=L a[1]=a a[2]=p . . .