Question: Which expression will extract the substring kap, given the following declaration: String str = kakapo; Select the one correct answer. (a) str.substring(2, 2) (b) str.substring(2,

Which expression will extract the substring "kap", given the following declaration:

String str = “kakapo”;

Select the one correct answer.

(a) str.substring(2, 2)

(b) str.substring(2, 3)

(c) str.substring(2, 4)

(d) str.substring(2, 5)

(e) str.substring(3, 3)

Step by Step Solution

3.48 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

d The expression strsubstr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!