Browse Source

Kinda done

Akeem Cherry 5 years ago
parent
commit
a5e593011e
1 changed files with 4 additions and 9 deletions
  1. 4
    9
      src/main/java/rocks/zipcode/io/quiz3/arrays/WaveGenerator.java

+ 4
- 9
src/main/java/rocks/zipcode/io/quiz3/arrays/WaveGenerator.java View File

@@ -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
     }