Web page zoom in and zoom out using Selenium webdriver

package SeleniumLearn.Com;
import org.testng.annotations.Test;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.BeforeTest;

public class zoomINzoomOUT {
    WebDriver driver;
      public void BrowserZoomINandZoomOUT() throws Exception{
public void zoomIn()  {  //To zoom In page 5 times using CTRL and "+" keys. 
           for(int i=0; i<5; i++){   
      driver.findElement(By.linkText("Selenium")).sendKeys(Keys.CONTROL, Keys.ADD);
public void zoomOut(){   //To zoom out page 9 times using CTRL and "-" keys.
            for(int i=0; i<9; i++){
      driver.findElement(By.linkText("Selenium")).sendKeys(Keys.CONTROL, Keys.SUBTRACT);
public void defaultset(){    //To set browser to default level like CTRL+0 
           driver.findElement(By.linkText("Selenium")).sendKeys(Keys.CONTROL, "0");
     public void setup() {
     driver = new FirefoxDriver();
     driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);