﻿---
title: Identifiers
description: Use an identifier as a named token to specify a variable, type, field, method, or function. Errors If a keyword is used as an identifier. Grammar Examples...
url: https://www.elastic.co/elastic/docs-builder/docs/2407/reference/scripting-languages/painless/painless-identifiers
products:
  - Painless
---

# Identifiers
Use an identifier as a named token to specify a [variable](https://www.elastic.co/elastic/docs-builder/docs/2407/reference/scripting-languages/painless/painless-variables), [type](https://www.elastic.co/elastic/docs-builder/docs/2407/reference/scripting-languages/painless/painless-types), [field](/elastic/docs-builder/docs/2407/reference/scripting-languages/painless/painless-operators-reference#field-access-operator), [method](/elastic/docs-builder/docs/2407/reference/scripting-languages/painless/painless-operators-reference#method-call-operator), or [function](https://www.elastic.co/elastic/docs-builder/docs/2407/reference/scripting-languages/painless/painless-functions).
**Errors**
If a [keyword](https://www.elastic.co/elastic/docs-builder/docs/2407/reference/scripting-languages/painless/painless-keywords) is used as an identifier.
**Grammar**
```text
ID: [_a-zA-Z] [_a-zA-Z-0-9]*;
```

**Examples**
- Variations of identifiers.
  ```java
  a
  Z
  id
  list
  list0
  MAP25
  _map25
  Map_25
  ```