# UseExperimental

Artifact: [androidx.annotation:annotation-experimental](https://developer.android.com/jetpack/androidx/releases/annotation) [View Source](https://cs.android.com/search?q=file:androidx/annotation/experimental/UseExperimental.kt+class:androidx.annotation.experimental.UseExperimental) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.0.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.1.0)

*** ** * ** ***


```
@Retention(value = AnnotationRetention.BINARY)
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FILE, AnnotationTarget.TYPEALIAS])
annotation UseExperimental
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This annotation is deprecated.**   
> This annotation has been replaced by \`@OptIn\`, use this instead:
>
> ```kotlin
> OptIn
> ```

Allows use of an experimental API denoted by the given markers in the annotated file, declaration, or expression. If a declaration is annotated with `https://developer.android.com/reference/kotlin/androidx/annotation/experimental/UseExperimental`, its usages are **not** required to opt-in to that experimental API.

## Summary

| ### Public constructors |
|---|
| `[UseExperimental](https://developer.android.com/reference/kotlin/androidx/annotation/experimental/UseExperimental#UseExperimental(kotlin.Array))(vararg markerClass: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-annotation/index.html>)` **This function is deprecated.** This annotation has been replaced by \`@OptIn\` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-annotation/index.html>>` | `https://developer.android.com/reference/kotlin/androidx/annotation/experimental/UseExperimental#markerClass()` **This property is deprecated.** This annotation has been replaced by \`@OptIn\` |

## Public constructors

### UseExperimental

Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.6.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.6.0)

```
[UseExperimental](https://developer.android.com/reference/kotlin/androidx/annotation/experimental/UseExperimental#UseExperimental(kotlin.Array))(vararg markerClass: KClass<Annotation>)
```

> [!CAUTION]
> **This function is deprecated.**   
> This annotation has been replaced by \`@OptIn\`, use this instead:
>
> ```kotlin
> OptIn
> ```

## Public properties

### markerClass

```
val markerClass: Array<KClass<Annotation>>
```

> [!CAUTION]
> **This property is deprecated.**   
> This annotation has been replaced by \`@OptIn\`, use this instead:
>
> ```kotlin
> OptIn
> ```

Defines the experimental API(s) whose usage this annotation allows.