LXR
JCHJava Community | Help. Code. Learn.
•Created by SidKid on 1/29/2025 in #java-help
attempted this code but still not working
The compiler tries to tell you that in line 23 (the marked line in the second screenshot), you call strDist with just one argument, where it expects two arguments. Do check how that line is meant to be. Often there's a mix-up in parentheses and commas. Right now, all the arguments go into the str.substring call, and the single return value of str.substring is not enough, as strDist expects two arguments. The same applies to the last return statement, but the compiler hasn't come that far yet.
6 replies