title: DriverManager.getConnection cannot be resolved to a type
body: <p>I am trying to connect a Java program to a database in localhost. My problem seems to be very simple, but I cannot find any answer.</p>
  
  <p>When I try to compile, I get the following error:</p>
  
  <blockquote>
    <p>DriverManager.getConnection cannot be resolved to a type</p>
  </blockquote>
  
  <p>On the following code:</p>
  
  <pre><code>try{
      Class.forName("com.mysql.jdbc.Driver");
  } catch (ClassNotFoundException ex){
      System.out.println("Error found " + ex);
      ex.printStackTrace();
  }
  
  // Here is where the error pops up
  Connection connection = new DriverManager.getConnection("jdbc:mysql//localhost:3306/project3", "root", "root");
  </code></pre>
  
  <p>I am assuming I screwed up some installation, but I am not completely sure what.</p>
  
  <p>Thank you for any help.</p>