Q:

Write a Java program to list the available character sets in charset objects

0

Write a Java program to list the available character sets in charset objects

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.nio.charset.Charset;
public class Exercise {
  public static void main(String[] args) {
	System.out.println("List of available character sets: ");  
    for (String str : Charset.availableCharsets().keySet()) {
      System.out.println(str);
    }
  }
}

output:

List of available character sets:                                                                             
Big5                                                                                                      
Big5-HKSCS                                                                                                    
CESU-8                                                                                                      
EUC-JP                                                                                                      
EUC-KR                                                                                                      
GB18030                                                                                                      
GB2312                                                                                                      
GBK                                                                                                      
IBM-Thai                                                                                                      
IBM00858                                                                                                      
IBM01140          
-----
x-windows-950                                                                                                 
x-windows-iso2022jp 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now