0
I want to convert string into array String c=x[i] in code is not working pls help
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner (System.in); String input = sc.nextLine(); String [] a = input.split(" "); int b = a.length; String x =""; String w =""; char d ='a'; for(int i =0;i<=b-1;++i){ String c = x[i]; int m =c.length(); for(int j=0;j<=m-2;++j){ char e =c.charAt(j+1); d =c.charAt(0); x = x + e ; } w =w+ x + d + "ey" + " "; } System.out.print(w); } }
3 ответов
+ 1
review in the for loop, String c=x[i];
x is’n array.
0
Can u please tell me the code
0
I'm. Beginner unable to understand properly