Last active
January 17, 2026 13:07
-
-
Save mcsee/9780cd7772afddbc8356bab8aa5eabed to your computer and use it in GitHub Desktop.
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com
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
| class Stack extends ArrayList { | |
| public void push(Object value) { … } | |
| public Object pop() { … } | |
| } | |
| // Stack doesn't behave Like an ArrayList | |
| // besides pop, push, top it also implements (or overrides) | |
| // get, set, add, remove and clear | |
| // stack elements can be arbitrary accessed | |
| // both classes are concrete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment