You need to set property first and then need to create the instance of ChromeDriver.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Driver {
public static void main(String[] args) {
[b:2neqn5oq]System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe");[/b:2neqn5oq]
[color=#008080:2neqn5oq]ChromeDriver cd= new ChromeDriver();
[/color:2neqn5oq]
cd.get("http://google.com");
}
}