🇨🇲 Java Enum: Cameroon’s Regions
Cameroon is divided into 10 regions. Here is the Java enum
with the ISO 3166-2:CM codes:
java
public enum CameroonRegion {
ADAMAOUA("CM-AD"),
CENTRE("CM-CE"),
EAST("CM-ES"),
FAR_NORTH("CM-EN"),
LITTORAL("CM-LT"),
NORTH("CM-NO"),
NORTH_WEST("CM-NW"),
WEST("CM-OU"),
SOUTH("CM-SU"),
SOUTH_WEST("CM-SW");
private final String code;
CameroonRegion(String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
🗃️ SQL Table and Insert Statements
sql
CREATE TABLE cameroon_regions (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
code VARCHAR(8) NOT NULL UNIQUE
);
INSERT INTO cameroon_regions (name, code) VALUES
('Adamaoua', 'CM-AD'),
('Centre', 'CM-CE'),
('East', 'CM-ES'),
('Far North', 'CM-EN'),
('Littoral', 'CM-LT'),
('North', 'CM-NO'),
('North-West', 'CM-NW'),
('West', 'CM-OU'),
('South', 'CM-SU'),
('South-West', 'CM-SW');
✅ Summary
This setup maps Cameroon’s 10 regions using ISO 3166-2:CM codes. It’s ideal for backend applications that need standardized administrative division data.