Here you can find the source of createAndOpen(String databaseName)
public static Connection createAndOpen(String databaseName) throws SQLException
//package com.java2s; //License from project: Open Source License import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class Main { public static Connection createAndOpen(String databaseName) throws SQLException { return DriverManager.getConnection("jdbc:derby:" + databaseName + ";create=true"); }/* w w w . ja va2 s .co m*/ }