+ 3

Code Coach Pig Latin w/ Do Loop?

I have a suspicion that I'm going down the wrong path trying to solve this. I am avoiding searching for how to do it, I want to solve it "myself". However, can someone please look and tell me if I should abandon this idea and start again or how to continue? What should I be thinking about? What do I need to do? Are there some links to read? Thanks in advance, I really appreciate your time and guidance! https://code.sololearn.com/ckwSq0gBr32n/?ref=app

17th Dec 2021, 1:47 PM
Ausgrindtube
Ausgrindtube - avatar
2 Answers
+ 5
Thanks SoloProg for the answer. I don't mean to appear ungrateful but I was hoping to have some feedback on my code more than just "the answer". Looks like doing a character array was wrong. I'll look into this substring. Thanks again!
17th Dec 2021, 6:39 PM
Ausgrindtube
Ausgrindtube - avatar
+ 3
Scanner sc = new Scanner(System.in); String[] sentence = sc.nextLine().split(" "); for (String w:sentence ) System.out.print(w.substring(1) + w.substring(0,1) + "ay "); // Good Luck
17th Dec 2021, 2:51 PM
SoloProg
SoloProg - avatar