/// Returns the first item from the given [List].
///
/// @param items the items to inspect
/// @return the first item
static String first(List<String> items) {
return items.getFirst();
}
/// Example:
///
/// ```java
/// var name = "Duke";
/// System.out.println(name);
/// ```
void demo() {}
# [JEP 467](https://openjdk.org/jeps/467) examples
Source: https://openjdk.org/jeps/467
```java
/// Returns the first item from the given [List].
///
/// @param items the items to inspect
/// @return the first item
static String first(List<String> items) {
return items.getFirst();
}
```
````java
/// Example:
///
/// ```java
/// var name = "Duke";
/// System.out.println(name);
/// ```
void demo() {}
````