System.out compiler error
<p>I'm using Linux text editor and compiling via terminal. I've come across a weird  problem where I'm getting compiler errors on a simple <code>System.out.println</code>. </p>

<p>Here is my code. I am trying to implement JDBC on a localhost database:</p>

<pre><code>import java.sql.*;

class DatabaseConnection {

final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
final String DB_URL = "jdbc:mysql://localhost:3306/mydb";

final String user = "root";
final String pass = "pass";

Connection connection;
Statement statement;

public DatabaseConnection(){

}

public void connect(){
    try {
        //Class.forName(JDBC_DRIVER);           
        connection = DriverManager.getConnection(DB_URL, user, pass);
        statement = connection.createStatement();
        ResultSet resultSet = statement.executeQuery("show tables");

        while(resultSet.next()){
            System.out.println(resultSet.toString());
        }
    } catch (SQLException sqle) {
        sqle.getErrorCode();
    }

}

     /*empty methods beyond this point*/

}
</code></pre>

<p>My test class to try out the new functionality:</p>

<pre><code>class Test {

    public static void main(String[] args){
        System.out.println("Hello");
        DatabaseConnection connection = new DatabaseConnection();
        connection.connect();
    }

}
</code></pre>

<p>When compiling in terminal I get the following errors:</p>

<pre><code>user@user ~/Desktop/Java/JavaSE_Project $ javac Test.java 
Test.java:4: error: cannot find symbol
    System.out.println("Hello");
          ^
 symbol:   variable out
 location: class System
 ./DatabaseConnection.java:26: error: cannot find symbol
            System.out.println("hello");
                  ^
 symbol:   variable out
 location: class System
 2 errors
</code></pre>

<p>I understand my logic isn't quite right as of yet but I'm honestly dumbstruck as to why it's doing this. </p>

<p>Java version:</p>

<pre><code>java version "1.7.0_95"
 OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
 OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
</code></pre>