where do you use overriding in framework

Solutions on MaxInterview for where do you use overriding in framework by the best coders in the world

showing results for - "where do you use overriding in framework"
Lacy
19 Mar 2019
1Set<Integer> set = new HashSet<>();
2List<Integer> list = new ArrayList<>();
3set.add(4);  ==> HashSet overrides add() method from Collection Interface
4list.add(8); ==> ArrayList overrides add() method from Collection Interface
5
6WebDriver driver1 = new ChromeDriver();
7driver1.get("xxxxxx"); ChromeDriver overrides get/findElement/etc.
8                                      methods from WebDriver Interface.
9
10WebDriver driver2 = new FirefoxDriver();
11driver2.get("xxxxxx"); FirefoxDriver overrides 
12get/findElement/etc. methods from WebDriver Interface.
13