Hello @ naresh,
With the actions object you should first move the menu title, and then move to the submenu item and click it.
First, we need to create new action builder instance by passing the webdriver instance, then.
Below is the sample code to perform Mouse hover action
Actions actions = new Actions(driver);
WebElement mainMenu = driver.findElement(By.linkText("menulink"));
WebElement subMenu = driver.findElement(By.cssSelector("subLinklocator"));
Here 'build()' method is used to compile all the list of actions into a single step and ready to be performed.
So you can try option(1)
Hope it helps!!