🇪🇷 Java Enum: Eritrea’s Regions
Eritrea is divided into 6 regions (also known as zobas), each with an ISO 3166-2:ER code. Here’s the Java enum
:
java
public enum EritreaRegion {
ANSEBA("ER-AN"),
DEBUB("ER-DU"),
DEBUBAWI_KEYIH_BAHRI("ER-DK"),
GASH_BARKA("ER-GB"),
MAEKEL("ER-MA"),
SEMENAWI_KEYIH_BAHRI("ER-SK");
private final String code;
EritreaRegion(String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
🗃️ SQL Table and Insert Statements
sql
CREATE TABLE eritrea_regions (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
code VARCHAR(8) NOT NULL UNIQUE
);
INSERT INTO eritrea_regions (name, code) VALUES
('Anseba', 'ER-AN'),
('Debub', 'ER-DU'),
('Debubawi Keyih Bahri', 'ER-DK'),
('Gash-Barka', 'ER-GB'),
('Maekel', 'ER-MA'),
('Semenawi Keyih Bahri', 'ER-SK');
✅ Summary
This structure provides full support for all 6 Eritrean regions, using the official ISO 3166-2:ER codes — ready for Java applications, SQL databases, and RESTful services.