0
I plan to make a project that prints out every 3rd letter of a string value
I get the StringIndexOutOfBoundsException when using while loops
2 odpowiedzi
+ 16
using Jay Matthews sir comment :
for(int i=2; i<s.length(); i+=3)
System.out.print(s.charAt(i));
0
Jay Matthews I meant that the character will be printed for every 3 letters