public static void main(String[] args) {
		BufferedReader reader = null;
		String sql = "insert into location (location) values (?)";
		Connection connection = null;
		PreparedStatement statement = null;
		try {
			Class.forName("oracle.jdbc.driver.OracleDriver");
			connection = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:XE", "expenseapp", "expenseapp");
			statement = connection.prepareStatement(sql);
			String country = null;
			reader = new BufferedReader(new FileReader("list of countries.txt"));
			while ((country = reader.readLine()) != null) {
				System.out.println(country);
				statement.setString(1, country);
				statement.executeUpdate();
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			if (statement != null) {
				try {
					statement.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
			if (connection != null) {
				try {
					connection.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
		}
	}