Programming & Development / April 11, 2025

How to Represent Lithuania’s Counties in Java and SQL Using ISO 3166-2 Codes

Lithuania counties Java enum Lithuania ISO 3166-2 LT SQL Lithuania counties LT county codes Lithuania administrative divisions backend region enum Lithuania counties Java SQL Spring Boot regions Lithuania

🇱🇹 Java Enum: Lithuania’s Counties

Lithuania is divided into 10 counties. Here’s the Java enum using ISO 3166-2:LT codes:

java

public enum LithuaniaCounty {
    ALYTAUS("LT-AL"),
    KAUNO("LT-KU"),
    KLAIPĖDOS("LT-KL"),
    MARIJAMPOLĖS("LT-MJ"),
    PANEVĖŽIO("LT-PN"),
    ŠIAULIŲ("LT-SH"),
    TELSŠIŲ("LT-TE"),
    UTENOS("LT-UT"),
    VILNIAUS("LT-VL"),
    VILKAVIŠKIO("LT-VK");

    private final String code;

    LithuaniaCounty(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

CREATE TABLE lithuania_counties (
    id SERIAL PRIMARY KEY,
    name VARCHAR(64) NOT NULL,
    code VARCHAR(8) NOT NULL UNIQUE
);

INSERT INTO lithuania_counties (name, code) VALUES
('Alytus', 'LT-AL'),
('Kaunas', 'LT-KU'),
('Klaipėda', 'LT-KL'),
('Marijampolė', 'LT-MJ'),
('Panevėžys', 'LT-PN'),
('Šiauliai', 'LT-SH'),
('Telšiai', 'LT-TE'),
('Utena', 'LT-UT'),
('Vilnius', 'LT-VL'),
('Vilkaviškis', 'LT-VK');

✅ Summary

This setup covers all 10 counties of Lithuania using ISO 3166-2:LT codes, ideal for backend services, Java applications, and SQL databases.



Comments

No comments yet

Add a new Comment

NUHMAN.COM

Information Technology website for Programming & Development, Web Design & UX/UI, Startups & Innovation, Gadgets & Consumer Tech, Cloud Computing & Enterprise Tech, Cybersecurity, Artificial Intelligence (AI) & Machine Learning (ML), Gaming Technology, Mobile Development, Tech News & Trends, Open Source & Linux, Data Science & Analytics

Categories

Tags

©{" "} Nuhmans.com . All Rights Reserved. Designed by{" "} HTML Codex