Substrings help ..

goofymcdooperface

Estimable
Feb 19, 2014
5
0
4,510
so today in CS class we where told by our teacher to go on the website known as codeacademy.com and do our home work on there and our home work was to get up to lesson 22 on java in lesson 22 they ask us to create a substring and i did that but for some reason it tells me that there is something wrong with my syntax
here's the code.

"wonderful day". substring(4,5,6,7);
4===d 5===e 6===r 7===f
 
Solution
subtring takes only 2 arguments. Beginning index and end index to extract a part of the string.

subtstring(4, 7) should get you what you're looking for if your trying to get 'derf'.

ubercake

Distinguished
Oct 28, 2009
308
0
18,960
subtring takes only 2 arguments. Beginning index and end index to extract a part of the string.

subtstring(4, 7) should get you what you're looking for if your trying to get 'derf'.
 
Solution