I was trying to use a reusable method in my framework. however, I am little confused about the new keyword in the last line. Without the new keyword, the return shows me an error.
public Home_Page hover() throws IOException, InterruptedException { Reusable_Class.mouseHover(driver, personalBank, 0, logger, "hovering on personal banking"); return new Home_Page(driver);
Can anyone please explain, why we need a return new instead of return?