Class.forName("oracle.jdbc.driver.OracleDriver");
connection = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:MYORACLE","SCOTT","dys");
callableStatement = connection.prepareCall("{call return_procedure(?,?)}");
callableStatement.setString(1, "1");
callableStatement.registerOutParameter(2, oracle.jdbc.OracleTypes.VARCHAR);
callableStatement.execute();
String username = callableStatement.getString(2);
System.out.println("username = "+username);