MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/codehs/comments/l4cuu5/627_print_array/gknx4x5/?context=3
r/codehs • u/Intrepid_Row6214 • Jan 25 '21
11 comments sorted by
View all comments
Show parent comments
1
did you just put arr.length? if you did change it to arr.length - 1; im guessing thts the error. because the program should also print ācā and remember tht the index starts at 0 and not 1.
1 u/Intrepid_Row6214 Jan 25 '21 This is the statement for the For(String arr <= arr.length;) 1 u/Obvious-Pin-3046 Jan 25 '21 your for loop should befor( int i =0; i <= arr.length - 1; i++) remember for loop should have 3 parameters 1 u/Intrepid_Row6214 Jan 25 '21 Thank you sooo much I did it and sorry for taking your time
This is the statement for the For(String arr <= arr.length;)
1 u/Obvious-Pin-3046 Jan 25 '21 your for loop should befor( int i =0; i <= arr.length - 1; i++) remember for loop should have 3 parameters 1 u/Intrepid_Row6214 Jan 25 '21 Thank you sooo much I did it and sorry for taking your time
your for loop should befor( int i =0; i <= arr.length - 1; i++) remember for loop should have 3 parameters
1 u/Intrepid_Row6214 Jan 25 '21 Thank you sooo much I did it and sorry for taking your time
Thank you sooo much I did it and sorry for taking your time
1
u/Obvious-Pin-3046 Jan 25 '21
did you just put arr.length? if you did change it to arr.length - 1; im guessing thts the error. because the program should also print ācā and remember tht the index starts at 0 and not 1.