So, I am learning Java, coming from Ruby and Python. I am writing selenium tests using WebDriver and cucumber, and this is basically what I have now:
CommonSteps.java
import org.openqa.selenium.WebDriver;
import cucumber.api.java.Before;
public class CommonSteps {
    public static WebDriver driver;
    @Before
    public void beforeScenario() {
        driver = new ChromeDriver();
    }
LoginSteps.java
import org.openqa.selenium.WebDriver;
public class LoginSteps {
    WebDriver driver = CommonSteps.driver;
    @When("^a thing happens$")
    public void a_thing_happens() {
        driver.get("http://google.com");
    }
}
Since I know that beforeScenario() will always be called before each test, and that method is in the CommonSteps file, I declare it as a class variable there, and create a local variable at the top of other step classes to use in those steps.  But since I'm just now learning java, is there a better way to do this?  I am trying to adhere to best practices and make this as user friendly and scalable as possible.  Thanks!
