Opening the reading…
Opening the reading…
DSA FUNDAMENTALS › STRING BASICS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Implement the same manual search in Java for target "naba" in text "bananaba". Reset the target index after each mismatch and print the first complete match index, 4, or -1 if no complete alignment is found.
OUTPUT
Sample4
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.