Answers for "Interface Inc."

0

interface

Interfaces specify what a class must do. 
It is the blueprint of the class.
It is used to achieve total abstraction. 
We are using implements keyword for interface.

Basic statement we all know in Selenium is
WebDriver driver = new FirefoxDriver();
WebDriver itself is an Interface.
So we are initializing Firefox browser
using Selenium WebDriver.
It means we are creating a reference variable
of the interface and creating an Object.
So WebDriver is an Interface and
FirefoxDriver is a class.
Posted by: Guest on November-28-2020
0

interfaces

class Calculator(AdvancedArithmetic):
    def divisorSum(self, n):
        temp = []
        for i in range(1, n+1):
            if n%i == 0:
                temp.append(i)
        return sum(temp)
Posted by: Guest on August-11-2021

Browse Popular Code Answers by Language