Hi Urmila, getOptions() is used to get all options from the dropdown list. This gets the all options belonging to the Select tag. It takes no parameter and returns List<WebElements>. Sometimes you may like to count the element in the dropdown and multiple select box, so that you can use the loop on Select element. Syntax for get method is:
dropdownElement.getOptions();
Example to understand the use of getOptions() method:
Select optionSelect = new Select(driver.findElement(By.id("dropdown_cities")));
List <WebElement> elementCount = optionSelect.getOptions();
System.out.println(elementCount.size());