- 1. To.make use of extended methods from a class and implement methods from interface , you need not always use 'extend' or 'implements' . A individual class can still use these methods by importing respective classes (For interface importing respective class that has implemented interface methods should suffice).
- DesiredCapabilities dc = DesiredCapabilities.chrome(); -- what does this do
- FruitClass a = new JamunClass(); ... This help to refer to methods of JamunClass with the help of object
Similarly we can use:
Interfacename obj= new classname()
This is generally used when some other class(used above code inside it) which has just imported the class that implements interface
4. UserClass a1 = new UserClass(FruitClass obj); -- what does obj do here
No comments:
Post a Comment