|
@@ -5,15 +5,10 @@ package rocks.zipcode.io.quiz3.arrays;
|
5
|
5
|
*/
|
6
|
6
|
public class WaveGenerator {
|
7
|
7
|
public static String[] wave(String str) {
|
8
|
|
- char[] arr = str.toCharArray();
|
9
|
|
- Integer counter = 0;
|
10
|
|
- for(int i=0;i < str.length(); i++) {
|
11
|
|
- for (int j = 0; j <= i; j++) {
|
12
|
|
- counter++;
|
13
|
|
- if(j < i){
|
14
|
|
- System.out.println(arr);
|
15
|
|
- }
|
16
|
|
- }
|
|
8
|
+ String spaces = "";
|
|
9
|
+ for(int i = 0; i < str.length(); i++){
|
|
10
|
+ System.out.println(str.toLowerCase().substring(0,i) + str.charAt(i) + str.toLowerCase().substring(i+1, str.length()-1));
|
|
11
|
+// spaces += " ";
|
17
|
12
|
}
|
18
|
13
|
return null;
|
19
|
14
|
}
|