1Fix the end index includedeasy · 8 minThe end index is not part of the result, so it takes one too few.Acceptance criteria1.#out should show Java.TaskHints 0/1Solution