The default browser of PhantomJS is IE, though many browser features do not work there. In case you want to open a headless(hidden) Firefox window, you can use the new feature of Firefox 56+.
With this feature you can get a headless driver like this:
System.setProperty("webdriver.gecko.driver", firefoxDriverExePath);
FirefoxOptions options = new FirefoxOptions();
options.addArguments("--headless");
FirefoxDriver driver = new FirefoxDriver(options);
If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s Selenium online certification exam!