VOOZH about

URL: https://www.geeksforgeeks.org/java/charset-name-method-in-java-with-examples/

⇱ Charset name() method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Charset name() method in Java with Examples

Last Updated : 28 Mar, 2019
The name() method is a built-in method of the java.nio.charset returns the charset's canonical name. Syntax:
public final String name()
Parameters: The function does not accepts any parameter. Return Value: The function returns the charset's canonical name. Below is the implementation of the above function: Program 1:
Output:
UTF-8
Program 2:
Comment