Question: Trace these codes , what is the output ? 8. public int firstLetterlndex(String s2) String s1-abcdefghijklmnopgrstuvwxyz return s1 indexOf(s2 substring($2 length0-2), 9 public boolean whatDoesltDo(String
8. public int firstLetterlndex(String s2) String s1-"abcdefghijklmnopgrstuvwxyz return s1 indexOf(s2 substring($2 length0-2), 9 public boolean whatDoesltDo(String st) for (inti 0, ist.length0/2,) String sub1 st substringi, i+ 1) String sub2 st substring(st length0-1-1, st.length)-) if (Isub1 equals(sub2)) return false return true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
