does the

return false

statment at the end of the method, will return false, only if none of the switch-case conditions will occure ? or that the recursive call can impact on it and use it in any other term ?

thx

Every case finishes with a return, so the extra return false will only be executed if none of the cases is true.
Sometimes this happens with the Java compiler. You know that every possible data will lead to one of your retunrs, but the compiler spots a theoretical possibility that it might not, so you have add an extra return to keep it happy.

Have you tried executing it yet? running test cases will tell you everything you need to know.

the return false will only be executed if none of the if statements and none of the case statements are executed.

Thanks guys for all of your help.
I really appreciate that !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.