question: static boolean compatibleMethods ( Class c1 , Class c2 ) { Method [ ] meths = c1 . getMethods ( ) ; for ( int i = meths . length ; -- i >= 0 ; ) { Method m1 = meths [ i ] ; try { Method m2 = c2 . getMethod ( m1 . getName ( ) , m1 . getParameterTypes ( ) ) ; if ( m2 != null && m1 . getReturnType ( ) != m2 . getReturnType ( ) ) { return false ; } } catch ( NoSuchMethodException e ) { } } return true ; }
target:  Returns true if the two classes have no public methods with the same name and parameter types but different return types.