Question: how to correct my code in java? 2 3 1 public class Mystery { public static String mystery(String first, int second) { if (second >=

how to correct my code in java? how to correct my code in java? 2 3 1 public class

2 3 1 public class Mystery { public static String mystery(String first, int second) { if (second >= 0) { return first.substring(e, second); } else { return 5 6 7 8 } Failed i tests. Here is one: Testing mystery(String first = "test", int second = -2) failed: Solution returned: "st" Submission returned: 4132

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!