🇦🇲 Java Enum: Armenia’s Provinces (Marzes)
Armenia is divided into 11 provinces (Marzes) and the capital city, Yerevan. Here’s the Java enum using the ISO 3166-2:AM codes.
java
public enum ArmeniaProvince {
ARAGATSOTN("AM-AG"),
ARARAT("AM-AR"),
ARMAVIR("AM-AV"),
GEGHARKUNIK("AM-GK"),
KOTAYK("AM-KT"),
VAYOTS_DZOR("AM-VD"),
LORI("AM-LOR"),
SHIRAK("AM-SH"),
SYUNIK("AM-SY"),
TAVUSH("AM-TV"),
YEREVAN("AM-YEV");
private final String code;
ArmeniaProvince(String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
🗃️ SQL Table and Insert Statements
sql
CREATE TABLE armenia_provinces (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
code VARCHAR(6) NOT NULL UNIQUE
);
INSERT INTO armenia_provinces (name, code) VALUES
('Aragatsotn', 'AM-AG'),
('Ararat', 'AM-AR'),
('Armavir', 'AM-AV'),
('Gegharkunik', 'AM-GK'),
('Kotayk', 'AM-KT'),
('Vayots Dzor', 'AM-VD'),
('Lori', 'AM-LOR'),
('Shirak', 'AM-SH'),
('Syunik', 'AM-SY'),
('Tavush', 'AM-TV'),
('Yerevan', 'AM-YEV');
✅ Summary
This setup represents Armenia’s 11 provinces (Marzes), along with the capital city Yerevan, using the official ISO 3166-2:AM codes. It’s perfect for geolocation, address validation, or administrative processing in your applications.