The connection was refused because the database TENANTS [BANTUU on BANTUU] was not found.
BUILD SUCCESSFUL (total time: 5 seconds)

***********Below are the source code*************

package database_console;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.ResultSet;

public class DBConnect {

public static void main(String[] args)
{
try
{
String host="jdbc:derby://localhost:1527/TENANTS ";
String username="BANTUU";
String password="BANTULUSIG";

DriverManager.registerDriver(new org.apache.derby.jdbc.EmbeddedDriver());
Connection con = DriverManager.getConnection(host,username,password );
Statement stmt= con.createStatement(ResultSet.TYPE_SCROLL_SENSITIV E,ResultSet.CONCUR_UPDATABLE);​

String SQL= "SELECT * FROM BANTUU.ROOMS";
//here we pass the SQL statement to a method called executeQuery
ResultSet rs=stmt.executeQuery(SQL);
//rs result object will hold all the records from the database rooms

rs.next();
int id_col=rs.getInt("ROOM_ID");
String type=rs.getString("ROOM_TYPE");
String desc=rs.getString("room_descriptions");

String p= id_col +" "+ type + " " + desc;

System.out.println(p);
}
catch(SQLException err)
{
System.out.println(err.getMessage());
}
}

}