Below program will create employee table in database.

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

public class Demo {

	public static void main(String[] args) {
		Connection connection = null;
		Statement stmt=null;
		try {
			Class.forName("oracle.jdbc.driver.OracleDriver");
			connection = DriverManager.getConnection(
					"jdbc:oracle:thin:@localhost:1521:XE", 
                                        "system",
                                        "oracle");
			String sql = "create table employee(
                                        empNo number,
                                        empName varchar2(20),
                                        empAddress varchar2(50))";
			stmt = connection.createStatement();
			stmt.executeUpdate(sql);
		} catch (ClassNotFoundException | SQLException ex) {
			ex.printStackTrace();
		} finally {
			try {
				if(connection!=null){
				 connection.close();
				}
				if(stmt!=null){
					stmt.close();
				}
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}

	}
}

Note:
Some of the SQL statements that are supported by oracle server may not be supported by the other servers. Hibernate,Toplink,Mybatis etc. can take care of the differences that exists in the SQL supported by different servers.