Ciao,
in questo codice mi si dice che c.method(c) è un nosuchmetod ma secondo me stampa b,che ne pensate?
codice:class A { String method(B b) { return "a"; } } class B extends A { String method(A a) { return "b"; } String method(B b) { return "c"; } } e i seguenti oggetti: A a = new A(); B b = new B(); A c = new B();

Rispondi quotando