static bool isAnonymousClassName(S s) { for i over s: if (s.charAt(i) == '$' && Character.isDigit(s.charAt(i+1))) true; false; }