Well, I was working on some questions my teacher found on some site and I was having difficulty on this question:
public static void method0910(String s)
{
int n = s.length();
if (n > 0)
{
String temp = s.substring(0,n-1);
method0910(temp);
System.out.println(s);
}
}
Which of the following is printed as a result of the call method0910("TANGO") ?
I looked at the solution and it says it's TA TAN TANG TANGO... But, how? What does the 0,n-1 do? The ',' I never understood either. Can somebody please go over this for me?

New Topic/Question
Reply




MultiQuote






|