Question: Consider the following code segment: public static String mystery(String word, int i, int ;) { String mystery - word.substring(i, i+ 1); mystery += word.substring(i, j);
Consider the following code segment: public static String mystery(String word, int i, int ;) { String mystery - word.substring(i, i+ 1); mystery += word.substring(i, j); return mystery } Which of the following is the most appropriate precondition for the variable 1 in mystery so that substring does not throw an exception? Precondition: i >= 0, i 0.1-0,1 0,1 -0,1 i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
