Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FUCK JAVA

Name: CHUMPY CS STUDENT 2010-12-07 20:53

public class Player extends Piece { ... }
/* ... */
public static Piece inputPiece() { ... }
/* ... */

Player playa = inputPiece();

ChumpyProgram.java:43: incompatible types
found   : Piece
required: Player


So what the fuck is the point of inheritance if you can't do that?

Name: Anonymous 2010-12-08 1:25

Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List