Java Lect 20
Java Lect 20
Topics
Examples in Recursion:
Recursion in JAVA
Quiz
If you are one step from the mall, take that step and
you are done
If you are further than one step from the mall, divide
the distance into two parts:
Say that you have a small rock and you have to break
it into smaller pieces with a hammer. How can you do
this?
further
To destroy a large rock, hit it with a hammer.
The rock shatters, leaving smaller and large
pieces
String Equality
ab !equals abc
abC !equals abc
abc !equals aBc
equals(
rule5
equals(
equals(
equals(
equals(
Quiz
(Choose the single best answer)
What
Quiz
How
Quiz
How
Quiz
How
Quiz
How
Thank You!
Questions??