# Locale.IsoCountryCode

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary: [Enums](https://developer.android.com/reference/java/util/Locale.IsoCountryCode#enumconstants) \| [Methods](https://developer.android.com/reference/java/util/Locale.IsoCountryCode#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/util/Locale.IsoCountryCode#inhmethods)  

# Locale.IsoCountryCode


`
public
static
final

enum
Locale.IsoCountryCode
`


`


`

`

extends `[Enum](https://developer.android.com/reference/java/lang/Enum)`<`[Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode)`>


`

`


`

|---|---|---------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [java.lang.Enum](https://developer.android.com/reference/java/lang/Enum)\<[java.util.Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode)\> ||
|   | ↳ | java.util.Locale.IsoCountryCode |

<br />

*** ** * ** ***

Enum for specifying the type defined in ISO 3166. This enum is used to
retrieve the two-letter ISO3166-1 alpha-2, three-letter ISO3166-1
alpha-3, four-letter ISO3166-3 country codes.  
**See also:**

- [Locale.getISOCountries(Locale.IsoCountryCode)](https://developer.android.com/reference/java/util/Locale#getISOCountries(java.util.Locale.IsoCountryCode))

## Summary

|                                                                                           ### Enum values                                                                                            ||
|--------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
| [Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode) | `PART1_ALPHA2` PART1_ALPHA2 is used to represent the ISO3166-1 alpha-2 two letter country codes.   |
| [Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode) | `PART1_ALPHA3` PART1_ALPHA3 is used to represent the ISO3166-1 alpha-3 three letter country codes. |
| [Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode) | `PART3` PART3 is used to represent the ISO3166-3 four letter country codes.                        |

|                                                                                                                                             ### Public methods                                                                                                                                             ||
|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode)  | ` `[valueOf](https://developer.android.com/reference/java/util/Locale.IsoCountryCode#valueOf(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` name) ` |
| ` static final `[IsoCountryCode[]](https://developer.android.com/reference/java/util/Locale.IsoCountryCode) | ` `[values](https://developer.android.com/reference/java/util/Locale.IsoCountryCode#values())`() `                                                                                            |

| ### Inherited methods |
|-----------------------|---|
| From class ` `[java.lang.Enum](https://developer.android.com/reference/java/lang/Enum)` ` |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` final `[Object](https://developer.android.com/reference/java/lang/Object)                                                                                                     | ` `[clone](https://developer.android.com/reference/java/lang/Enum#clone())`() ` Throws CloneNotSupportedException.                                                                                                                                                                                                                                                 | | ` final int`                                                                                                                                                                    | ` `[compareTo](https://developer.android.com/reference/java/lang/Enum#compareTo(E))`(`[Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode)` o) ` Compares this enum with the specified object for order.                                                                                                               | | ` final boolean`                                                                                                                                                                | ` `[equals](https://developer.android.com/reference/java/lang/Enum#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` other) ` Returns true if the specified object is equal to this enum constant.                                                                                                                   | | ` final void`                                                                                                                                                                   | ` `[finalize](https://developer.android.com/reference/java/lang/Enum#finalize())`() ` enum classes cannot have finalize methods.                                                                                                                                                                                                                                   | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<`[Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode)`>` | ` `[getDeclaringClass](https://developer.android.com/reference/java/lang/Enum#getDeclaringClass())`() ` Returns the Class object corresponding to this enum constant's enum type.                                                                                                                                                                                  | | ` final int`                                                                                                                                                                    | ` `[hashCode](https://developer.android.com/reference/java/lang/Enum#hashCode())`() ` Returns a hash code for this enum constant.                                                                                                                                                                                                                                  | | ` final `[String](https://developer.android.com/reference/java/lang/String)                                                                                                     | ` `[name](https://developer.android.com/reference/java/lang/Enum#name())`() ` Returns the name of this enum constant, exactly as declared in its enum declaration.                                                                                                                                                                                                 | | ` final int`                                                                                                                                                                    | ` `[ordinal](https://developer.android.com/reference/java/lang/Enum#ordinal())`() ` Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).                                                                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String)                                                                                                           | ` `[toString](https://developer.android.com/reference/java/lang/Enum#toString())`() ` Returns the name of this enum constant, as contained in the declaration.                                                                                                                                                                                                     | | ` static <T extends `[Enum](https://developer.android.com/reference/java/lang/Enum)`<T>> T`                                                                                     | ` `[valueOf](https://developer.android.com/reference/java/lang/Enum#valueOf(java.lang.Class<T>,%20java.lang.String))`(`[Class](https://developer.android.com/reference/java/lang/Class)`<T> enumClass, `[String](https://developer.android.com/reference/java/lang/String)` name) ` Returns the enum constant of the specified enum class with the specified name. | ||
| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                        | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                             | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                            | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`.                                                                                                                                                 | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                   | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                              | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                           | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                              | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.                                                                                             | ||
| From interface ` `[java.lang.Comparable](https://developer.android.com/reference/java/lang/Comparable)` ` |-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int` | ` `[compareTo](https://developer.android.com/reference/java/lang/Comparable#compareTo(T))`(`[Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode)` o) ` Compares this object with the specified object for order. | ||

## Enum values

### PART1_ALPHA2

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Locale.IsoCountryCode PART1_ALPHA2
```

PART1_ALPHA2 is used to represent the ISO3166-1 alpha-2 two letter
country codes.

<br />

### PART1_ALPHA3

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Locale.IsoCountryCode PART1_ALPHA3
```

PART1_ALPHA3 is used to represent the ISO3166-1 alpha-3 three letter
country codes.

<br />

### PART3

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Locale.IsoCountryCode PART3
```

PART3 is used to represent the ISO3166-3 four letter country codes.

<br />

## Public methods

### valueOf

```
public static Locale.IsoCountryCode valueOf (String name)
```

<br />

<br />

|       Parameters        ||
|--------|-----------------|
| `name` | `String` <br /> |

|                                                 Returns                                                  ||
|--------------------------------------------------------------------------------------------------|--------|
| [Locale.IsoCountryCode](https://developer.android.com/reference/java/util/Locale.IsoCountryCode) | <br /> |

### values

```
public static final IsoCountryCode[] values ()
```

<br />

<br />

|                                               Returns                                               ||
|---------------------------------------------------------------------------------------------|--------|
| [IsoCountryCode[]](https://developer.android.com/reference/java/util/Locale.IsoCountryCode) | <br /> |