When u use Selenium 3.x you should download chromedriver.exe and save it in your machine. Then u 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 esacpe the back slases "\\".
Below code will help you:
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/");
}
}