When you use Selenium 3.x you should download chromedriver.exe and save it in your machine. Then you have to add the absolute path of the chromedriver.exe using System.setProperty.
Make sure while you mention the absolute path of the chromedriver.exe through System.setProperty, you should either provide front slashes "/" or escape the backslashes "\\".
For example:
public class first
{
public static void main(String args[])
{ System.setProperty("webdriver.chrome.driver","C:/your_directory/chromedriver.exe");
WebDriver dr1= new ChromeDriver(); ;
dr1.get("http://www.google.com/");
}
}
Hope this answer helps you!