🇰🇷 Java Enum: South Korea’s Provinces
South Korea is divided into 9 provinces and 1 special autonomous city (Seoul). Here’s the Java enum
using ISO 3166-2:KR codes:
java
public enum SouthKoreaProvince {
CHUNGBUK("KR-11"),
CHUNGNAM("KR-12"),
GANGWON("KR-13"),
GYEONGBUK("KR-21"),
GYEONGNAM("KR-22"),
JEONBUK("KR-23"),
JEONNAM("KR-24"),
SEOUL("KR-11"),
INCHEON("KR-28"),
DAEJEON("KR-30"),
BUSAN("KR-26"),
GYEONGGI("KR-41"),
ULSAN("KR-31"),
SEJONG("KR-36");
private final String code;
SouthKoreaProvince(String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
🗃️ SQL Table and Insert Statements
sql
CREATE TABLE south_korea_provinces (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
code VARCHAR(8) NOT NULL UNIQUE
);
INSERT INTO south_korea_provinces (name, code) VALUES
('Chungbuk', 'KR-11'),
('Chungnam', 'KR-12'),
('Gangwon', 'KR-13'),
('Gyeongbuk', 'KR-21'),
('Gyeongnam', 'KR-22'),
('Jeonbuk', 'KR-23'),
('Jeonnam', 'KR-24'),
('Seoul', 'KR-11'),
('Incheon', 'KR-28'),
('Daejeon', 'KR-30'),
('Busan', 'KR-26'),
('Gyeonggi', 'KR-41'),
('Ulsan', 'KR-31'),
('Sejong', 'KR-36');
✅ Summary
This setup covers all 9 provinces and 1 special autonomous city of South Korea using ISO 3166-2:KR codes, ideal for backend services, Java applications, and SQL databases.