Category:
Selenium WebDriver
WebDriver is an interface and all the methods which are declared in Webdriver interface are implemented by respective driver class.
But if we do upcasting,we can run the scripts in any browser .i.e running the same automation scripts in different browsers to achieve Runtime Polymorphism.
WebDriver is an interface, driver is a reference variable, FirefoxDriver() is a Constructor, new is a keyword, and new FirefoxDriver() is an Object.