fork download
  1. class Ideone
  2. {
  3. public static void trickyprintln(Object o) throws Exception {
  4. System.out.getClass().getMethod("println",o.getClass()).invoke(System.out,o);
  5. }
  6.  
  7. public static void main (String[] args) throws Exception {
  8. char c[]={'a','b','c'};
  9. trickyprintln(c);
  10. Object o=c;
  11. trickyprintln(o);
  12. }
  13. }
Success #stdin #stdout 0.04s 2184192KB
stdin
Standard input is empty
stdout
abc
abc