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
5 odpowiedzi
+ 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..
+ 4
https://code.sololearn.com/cyfWLIoyGa53/?ref=app
Easiest way imo.
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 ");
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();