import java.sql.*;
class jdbcCountryPop {
  public static void main (String args [])
   throws SQLException {
 DriverManager.registerDriver(new
         oracle.jdbc.driver.OracleDriver());
 String url = "jdbc:oracle:thin:/*hier korrekt fortsetzen              *///@oracle11.informatik.uni-goettingen.de:1521/dbis";
 Connection conn =
    DriverManager.getConnection(url,"scott","tiger");

 PreparedStatement giveCountryPop =
   conn.prepareStatement(
      "SELECT Population FROM Country WHERE Code = ?");
 giveCountryPop.setString(1,args[0]);
 ResultSet rset = giveCountryPop.executeQuery();
 if(rset.next()) {
  int pop = rset.getInt(1);
  if (rset.wasNull()) System.out.print("null");
  else System.out.print(pop);
  }
 else System.out.print("Kein zulaessiger Landescode");
 System.out.println();
 conn.close();
}}
