java 方法 示例_Java语言环境getISOLanguages()方法与示例
java 方法 示例
區(qū)域設(shè)置類getISOLanguages()方法 (Locale Class getISOLanguages() method)
getISOLanguages() method is available in java.util package.
getISOLanguages()方法在java.util包中可用。
getISOLanguages() method is used to return an array of string that holds two-letter available language codes in ISO 639.
getISOLanguages()方法用于返回一個(gè)字符串?dāng)?shù)組,該字符串?dāng)?shù)組包含ISO 639中兩個(gè)字母的可用語言代碼。
getISOLanguages() method is a static method, it is accessible with the class name and if we try to access the method with the class object then we will not get an error.
getISOLanguages()方法是一個(gè)靜態(tài)方法,可以使用類名稱進(jìn)行訪問,如果嘗試使用類對(duì)象訪問該方法,則不會(huì)收到錯(cuò)誤。
getISOLanguages() method does not throw an exception at the time of returning the array of the string of language codes.
返回語言代碼字符串?dāng)?shù)組時(shí), getISOLanguages()方法不會(huì)引發(fā)異常。
Syntax:
句法:
public static String[] getISOLanguages();Parameter(s):
參數(shù):
It does not accept any parameter.
它不接受任何參數(shù)。
Return value:
返回值:
The return type of the method is String[], it returns list of all two letter language codes that exists in ISO 639.
該方法的返回類型為String [] ,它返回ISO 639中存在的所有兩個(gè)字母語言代碼的列表。
Example:
例:
// Java program to demonstrate the example // of String[] getISOLanguages() method of Locale import java.util.*;public class GetISOLanguagesOfLocale {public static void main(String[] args) {// Instantiates LocaleLocale lo = new Locale("JAPANESE", "JAPAN");// Display LocaleSystem.out.println("lo: " + lo);// By using getISOLanguages() method is// to return all 2 letter ISO 3166 codes// for the locale languagesString[] lang = lo.getISOLanguages();System.out.println("lo.getISOLanguages(): ");for (int i = 0; i < lang.length; ++i)System.out.println(lang[i]);} }Output
輸出量
lo: japanese_JAPAN lo.getISOLanguages(): aa ab ae af ak am an ar as av ay az ba be bg bh bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik in io is it iu iw ja ji jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu翻譯自: https://www.includehelp.com/java/locale-getisolanguages-method-with-example.aspx
java 方法 示例
總結(jié)
以上是生活随笔為你收集整理的java 方法 示例_Java语言环境getISOLanguages()方法与示例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: synchronized底层是如何实现的
- 下一篇: Java文件类boolean canWr