Created
June 5, 2019 09:43
-
-
Save dnivra26/fb72f75ef2e7e93d7455cae8d606bd43 to your computer and use it in GitHub Desktop.
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 List { | |
public void add(){ | |
} | |
public int get() { | |
} | |
} | |
class Stack extends List{ | |
@Override | |
public void add() { | |
super.add(); | |
} | |
@Override | |
public int get() { | |
return super.get(); | |
} | |
} | |
public class LSP { | |
public static void main(String[] args) { | |
List list = new List(); | |
Stack stack = new Stack(); | |
List myList = new Stack(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment