🇪🇹 Java Enum: Ethiopia’s Regions
Ethiopia is divided into 11 regions (including two chartered cities). Here's the Java enum
using ISO 3166-2:ET codes:
java
public enum EthiopiaRegion {
ADDIS_ABABA("ET-AA"),
AFAR("ET-AD"),
AMHARA("ET-AM"),
BENISHANGUL_GUMUZ("ET-BE"),
DIRE_DAWA("ET-DD"),
GAMBELA("ET-GA"),
HARARI("ET-HA"),
OROMIA("ET-OR"),
SIDAMA("ET-SD"),
SNNPR("ET-SN"),
TIGRAY("ET-TI");
private final String code;
EthiopiaRegion(String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
🗃️ SQL Table and Insert Statements
sql
CREATE TABLE ethiopia_regions (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
code VARCHAR(8) NOT NULL UNIQUE
);
INSERT INTO ethiopia_regions (name, code) VALUES
('Addis Ababa', 'ET-AA'),
('Afar', 'ET-AD'),
('Amhara', 'ET-AM'),
('Benishangul-Gumuz', 'ET-BE'),
('Dire Dawa', 'ET-DD'),
('Gambela', 'ET-GA'),
('Harari', 'ET-HA'),
('Oromia', 'ET-OR'),
('Sidama', 'ET-SD'),
('SNNPR', 'ET-SN'),
('Tigray', 'ET-TI');
✅ Summary
This setup provides all 11 regions of Ethiopia, using official ISO 3166-2:ET codes, suitable for backend systems, Java applications, and database implementations.