And what is the error you are receiving?
You may as well simplify this as well by making it a prepared statement. Prepared statements have many advantages over standard statements.
Code:
String username = "abc";
String sqlText = "select CustId, CustLoginId, CustPassword from javaDB.Customer where custLoginId = ?";
PreparedStatement stmt = conn.prepareStatement(sqlText);
stmt.setString(1, username);
ResultSet rs = stmt.executeQuery();