fork(1) download
  1. import java.lang.reflect.Method;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Main main = new Main();
  6. for(Method m : main.getClass().getDeclaredMethods()){
  7. System.out.println(m.getName() + ": " + Number.class.isAssignableFrom(m.getReturnType()));
  8. }
  9. }
  10.  
  11. public static int mInt(){ return 1; }
  12.  
  13. public static Integer mInteger(){ return 1; }
  14.  
  15. public static double mDouble(){ return 1.0; }
  16.  
  17. public static Double mDoubleD(){ return 1.0; }
  18. }
  19.  
Success #stdin #stdout 0.06s 380224KB
stdin
Standard input is empty
stdout
main: false
mInteger: true
mInt: false
mDouble: false
mDoubleD: true