java util locale_Java.util.Locale类

Sr.No.

Method & Description

1

Object clone()

This method overrides Cloneable

2

boolean equals(Object obj)

This method returns true if this Locale is equal to another object.

3

static Locale[] getAvailableLocales()

This method returns an array of all installed locales.

4

String getCountry()

This method returns the country/region code for this locale, which will either be the empty string or an uppercase ISO 3166 2-letter code.

5

static Locale getDefault()

This method gets the current value of the default locale for this instance of the Java Virtual Machine.

6

String getDisplayCountry()

This method returns a name for the locale’s country that is appropriate for display to the user.

7

S String getDisplayCountry(Locale inLocale)

This method Returns a name for the locale’s country that is appropriate for display to the user.

8

String getDisplayLanguage()

This method returns a name for the locale’s language that is appropriate for display to the user.

9

String getDisplayLanguage(Locale inLocale)

This method returns a name for the locale’s language that is appropriate for display to the user.

10

String getDisplayName()

This method returns a name for the locale that is appropriate for display to the user.

11

String getDisplayName(Locale inLocale)

This method returns a name for the locale that is appropriate for display to the user.

12

String getDisplayVariant()

This method returns a name for the locale’s variant code that is appropriate for display to the user.

13

String getDisplayVariant(Locale inLocale)

This method returns a name for the locale’s variant code that is appropriate for display to the user.

14

String getISO3Country()

This method returns a three-letter abbreviation for this locale’s country.

15

String getISO3Language()

This method returns returns a three-letter abbreviation for this locale’s language.

16

static String[] getISOCountries()

This method returns a list of all 2-letter country codes defined in ISO 3166.

17

static String[] getISOLanguages()

This method returns a list of all 2-letter language codes defined in ISO 639.

18

String getLanguage()

This method returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code.

19

String getVariant()

This method returns the variant code for this locale.

20

int hashCode()

This method override hashCode.

21

static void setDefault(Locale newLocale)

This method sets the default locale for this instance of the Java Virtual Machine.

22

String toString()

This method is the getter for the programmatic name of the entire locale, with the language, country and variant separated by underbars.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值