Created
March 20, 2015 05:52
-
-
Save ferromir/1dfdd4c67cd7089f1f5b to your computer and use it in GitHub Desktop.
ACR - Java - Final usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Design your class for inheritance and document it, otherwise forbid it using final | |
final class ChessAlgorithm { | |
. . . | |
} | |
/* Result: | |
Chess.java:6: Can't subclass final classes: class ChessAlgorithm | |
class BetterChessAlgorithm extends ChessAlgorithm { | |
^ | |
1 error */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment