THE shortest solution in JAVA(one line)


#1

public class Solution {
public int strStr(final String A, final String B) {
return A.indexOf(B);
}
}


#2

Reading the question again (and slowly this time) might help.
You’re not supposed to use in-built functions.