Here is the code to open the browser using FireFox Driver in Selenium:-
public class Browser {
public static void main(String[] args) {
Object obj = new Object();
obj.openBrowser();
}
public void openBrowser() {
System.setProperty("webdriver.firefox.marionette","D:\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
}}