Java StandardCharsets UTF_8

Syntax

StandardCharsets.UTF_8 has the following syntax.

public static final Charset UTF_8

Example

In the following code shows how to use StandardCharsets.UTF_8 field.


/*from  w ww  . j av a 2 s  .com*/
import java.nio.charset.StandardCharsets;

public class Main {
  public static void main(String[] args) throws Exception {
    System.out.println(StandardCharsets.UTF_8.name());
  }

}




















Home »
  Java Tutorial »
    java.nio.charset »




Charset
CharsetDecoder
CharsetEncoder
StandardCharsets