Java StandardCharsets UTF_16

Syntax

StandardCharsets.UTF_16 has the following syntax.

public static final Charset UTF_16

Example

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


//from   www . ja  v  a 2 s  . c  om
import java.nio.charset.StandardCharsets;

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

}




















Home »
  Java Tutorial »
    java.nio.charset »




Charset
CharsetDecoder
CharsetEncoder
StandardCharsets