Pregunta metodo this
Publicado por sick (1 intervención) el 27/04/2008 05:05:34
class One {
public One foo() { return this; }
}
class Two extends One {
public One foo() { return this; }
}
class Three extends Two {
// insert method here
}
Porque si es correcto:
public Two foo() { return this; }
public One foo() { return this; }
Y no esto:
public Object foo() { return this; }
public One foo() { return this; }
}
class Two extends One {
public One foo() { return this; }
}
class Three extends Two {
// insert method here
}
Porque si es correcto:
public Two foo() { return this; }
public One foo() { return this; }
Y no esto:
public Object foo() { return this; }
Valora esta pregunta


0