0

Pig Latin - need help

Hello I’m trying to resolve pig Latin for Java. But don’t understand- where is mistake? Could someone to help me? https://code.sololearn.com/c3zbfEPE32o3/?ref=app

15th Feb 2020, 3:48 PM
Alexey Seliverstov
Alexey Seliverstov - avatar
5 Answers
+ 4
splitting with space so argument should give be a space. s.split(" ") ; When for this single dimension array is enough, why you are using 2d, it confusing..
15th Feb 2020, 3:52 PM
Jayakrishna 🇮🇳
Jayakrishna 🇮🇳 - avatar
4th May 2020, 8:16 PM
Pawel
Pawel - avatar
0
yes, split with space String[] arr = s.split(" "); and chars are numbers internally, 'A' + 'A' = 130 not "AA" but with String it works "String"+'A' is "StringA" so if (j == (arr[i].length() - 1)) // gg += (ch[i][0] + 'a' + 'y' + ' '); gg += ch[i][j] +(ch[i][0] +"ay ");
16th Feb 2020, 1:16 AM
zemiak
0
Jayakrishna🇮🇳 Bro can i ask something? Where you learn s.split(); and hasNext(); ? Cause i learn java in SoloLearn until array chapter i never see s.split(); and hasNext();
27th Apr 2021, 10:31 PM
AfterRain
AfterRain - avatar