I am building a web application with java and using JDBC driver

please tell me if i wrong, i dont think using this block of code is secured
how should i make it secured without using "HARD CODED" password

```
Connection connection = null;
connection = DriverManager.getConnection(
    "jdbc:oracle:thin:@localhost:1521:mkyong","username","password");
connection.close();

```

taken from:
 <http://www.mkyong.com/jdbc/connect-to-oracle-db-via-jdbc-driver-java/>