My code is:-
import java.sql.*;
import java.io.*;
public class dbcon{
public static void main(String[] args) {
Connection connection = null;
try {
// Load the JDBC driver
String driverName = "oracle.jdbc.driver.OracleDriver";
Class.forName(driverName);
// Create a connection to the database
//String serverName = "127.0.0.1";
//String portNumber = "1521";
//String sid = "oracle";
String url = "jdbc:oracle:thin

//local.server:1521/oracle";
String username = "scott";
String password = "tiger";
connection = DriverManager.getConnection(url, username, password);
System.out.println("***Connected to the database***");
} catch (ClassNotFoundException e) {
// Could not find the database driver
} catch (SQLException e) {
// Could not connect to the database
}
}
The compilation error whichI'm getting is:
The pointer has reached at the end of line while parsing} ->