Question: Consider the following recursive method. publ ic stat ic boolean recurMethod ( St r ing st r ) { i f ( st r .
Consider the following recursive method.
publ ic stat ic boolean recurMethodSt r ing st r
i f st r length
return t rue;
else i f st r subst r ingcompareTost r subst r ing
return recurMethodst r subst r ing ;
else
return false;
Which of the following method calls will return t rue
A recurMethodabcba
B recurMethodabcde
C recurMethodbcdab
D recurMethodedcba
E recurMethodedcde
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
