- 浏览: 184537 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (103)
- Java综合 (19)
- java模式 (1)
- java 包详解 (8)
- 需要阅读的书目 (1)
- Json (1)
- MySQL (2)
- zkoss (2)
- svn (1)
- JavaScript (1)
- html (1)
- 试题集锦 (6)
- 试题集锦_poj (1)
- Vim 操作 (2)
- Linux 操作 (5)
- NS2 学习 (2)
- 网络 (4)
- c/c++ (7)
- WNS - Wired Network Simulator (1)
- 网络信息体系结构 (16)
- MIPS (1)
- Java图形化编程 (2)
- 数据结构 (1)
- 数学 (3)
- 爬虫 (1)
- 搜索引擎 (1)
- NetFPGA (1)
- Directshow (1)
- 小软件 (2)
- FFMPEG (1)
- Windows Socket 网络编程 (5)
- Git (1)
- IntelliJ IDEA (0)
- Plone (1)
- Python (1)
最新评论
-
不要叫我杨过:
受教了,高手
Heritrix架构分析 -
springaop_springmvc:
apache lucene开源框架demo使用实例教程源代码下 ...
Lucene 3.0.2 使用入门 -
zxw961346704:
值得学习的算法
Java 计算器 -
medicine:
Thread.sleep(1000); 会使线程进入 TIM ...
Java.lang.Thread 和 Java.lang.ThreadGroup -
tangzlboy:
嗯,不错!收藏。
Java 入门
在util包下,有几个类是跟语言、时区等相关的类。正是java的这些类,使得跟语言或者时区敏感的项目变得实现起来相当的容易,并且安全性高。
包括Date、Calendar、GregorianCalendar、Locale、TimeZone、Currency六个类。下面的代码可以了解这些类的基本用法。更加详细的用法,涉及到具体的函数操作,请查看JDK。
(在Date()中很多方法已经过时,鼓励使用Calendar类来实现时间函数。)
结果:
---------------- Date Calendar GregorianCalendar ----------------
Local Time: 2:52:10
Chinese Time: 9:52:10
Local Time: 2:52:10
---------------- Currency ----------------
CNY
---------------- Available Locales ----------------
Japanese (Japan)
Spanish (Peru)
English
Japanese (Japan,JP)
Spanish (Panama)
Serbian (Bosnia and Herzegovina)
Macedonian
Spanish (Guatemala)
Arabic (United Arab Emirates)
Norwegian (Norway)
Albanian (Albania)
Bulgarian
Arabic (Iraq)
Arabic (Yemen)
Hungarian
Portuguese (Portugal)
Greek (Cyprus)
Arabic (Qatar)
Macedonian (Macedonia)
Swedish
German (Switzerland)
English (United States)
Finnish (Finland)
Icelandic
Czech
English (Malta)
Slovenian (Slovenia)
Slovak (Slovakia)
Italian
Turkish (Turkey)
Chinese
Thai
Arabic (Saudi Arabia)
Norwegian
English (United Kingdom)
Serbian (Serbia and Montenegro)
Lithuanian
Romanian
English (New Zealand)
Norwegian (Norway,Nynorsk)
Lithuanian (Lithuania)
Spanish (Nicaragua)
Dutch
Irish (Ireland)
French (Belgium)
Spanish (Spain)
Arabic (Lebanon)
Korean
French (Canada)
Estonian (Estonia)
Arabic (Kuwait)
Serbian (Serbia)
Spanish (United States)
Spanish (Mexico)
Arabic (Sudan)
Indonesian (Indonesia)
Russian
Latvian
Spanish (Uruguay)
Latvian (Latvia)
Hebrew
Portuguese (Brazil)
Arabic (Syria)
Croatian
Estonian
Spanish (Dominican Republic)
French (Switzerland)
Hindi (India)
Spanish (Venezuela)
Arabic (Bahrain)
English (Philippines)
Arabic (Tunisia)
Finnish
German (Austria)
Spanish
Dutch (Netherlands)
Spanish (Ecuador)
Chinese (Taiwan)
Arabic (Jordan)
Belarusian
Icelandic (Iceland)
Spanish (Colombia)
Spanish (Costa Rica)
Spanish (Chile)
Arabic (Egypt)
English (South Africa)
Thai (Thailand)
Greek (Greece)
Italian (Italy)
Catalan
Hungarian (Hungary)
French
English (Ireland)
Ukrainian (Ukraine)
Polish (Poland)
French (Luxembourg)
Dutch (Belgium)
English (India)
Catalan (Spain)
Arabic (Morocco)
Spanish (Bolivia)
English (Australia)
Serbian
Chinese (Singapore)
Portuguese
Ukrainian
Spanish (El Salvador)
Russian (Russia)
Korean (South Korea)
Vietnamese
Arabic (Algeria)
Vietnamese (Vietnam)
Serbian (Montenegro)
Albanian
Arabic (Libya)
Arabic
Chinese (China)
Belarusian (Belarus)
Chinese (Hong Kong)
Japanese
Hebrew (Israel)
Bulgarian (Bulgaria)
Indonesian
Maltese (Malta)
Spanish (Paraguay)
Slovenian
French (France)
Czech (Czech Republic)
Italian (Switzerland)
Romanian (Romania)
Spanish (Puerto Rico)
English (Canada)
German (Germany)
Irish
German (Luxembourg)
German
Spanish (Argentina)
Slovak
Malay (Malaysia)
Croatian (Croatia)
English (Singapore)
Danish
Maltese
Polish
Arabic (Oman)
Turkish
Thai (Thailand,TH)
Greek
Malay
Swedish (Sweden)
Danish (Denmark)
Spanish (Honduras)
---------------- Available TimeZone IDs ----------------
ACT
AET
AGT
ART
AST
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
Africa/Gaborone
Africa/Harare
Africa/Johannesburg
Africa/Kampala
Africa/Khartoum
Africa/Kigali
Africa/Kinshasa
Africa/Lagos
Africa/Libreville
Africa/Lome
Africa/Luanda
Africa/Lubumbashi
Africa/Lusaka
Africa/Malabo
Africa/Maputo
Africa/Maseru
Africa/Mbabane
Africa/Mogadishu
Africa/Monrovia
Africa/Nairobi
Africa/Ndjamena
Africa/Niamey
Africa/Nouakchott
Africa/Ouagadougou
Africa/Porto-Novo
Africa/Sao_Tome
Africa/Timbuktu
Africa/Tripoli
Africa/Tunis
Africa/Windhoek
America/Adak
America/Anchorage
America/Anguilla
America/Antigua
America/Araguaina
America/Argentina/Buenos_Aires
America/Argentina/Catamarca
America/Argentina/ComodRivadavia
America/Argentina/Cordoba
America/Argentina/Jujuy
America/Argentina/La_Rioja
America/Argentina/Mendoza
America/Argentina/Rio_Gallegos
America/Argentina/Salta
America/Argentina/San_Juan
America/Argentina/San_Luis
America/Argentina/Tucuman
America/Argentina/Ushuaia
America/Aruba
America/Asuncion
America/Atikokan
America/Atka
America/Bahia
America/Barbados
America/Belem
America/Belize
America/Blanc-Sablon
America/Boa_Vista
America/Bogota
America/Boise
America/Buenos_Aires
America/Cambridge_Bay
America/Campo_Grande
America/Cancun
America/Caracas
America/Catamarca
America/Cayenne
America/Cayman
America/Chicago
America/Chihuahua
America/Coral_Harbour
America/Cordoba
America/Costa_Rica
America/Cuiaba
America/Curacao
America/Danmarkshavn
America/Dawson
America/Dawson_Creek
America/Denver
America/Detroit
America/Dominica
America/Edmonton
America/Eirunepe
America/El_Salvador
America/Ensenada
America/Fort_Wayne
America/Fortaleza
America/Glace_Bay
America/Godthab
America/Goose_Bay
America/Grand_Turk
America/Grenada
America/Guadeloupe
America/Guatemala
America/Guayaquil
America/Guyana
America/Halifax
America/Havana
America/Hermosillo
America/Indiana/Indianapolis
America/Indiana/Knox
America/Indiana/Marengo
America/Indiana/Petersburg
America/Indiana/Tell_City
America/Indiana/Vevay
America/Indiana/Vincennes
America/Indiana/Winamac
America/Indianapolis
America/Inuvik
America/Iqaluit
America/Jamaica
America/Jujuy
America/Juneau
America/Kentucky/Louisville
America/Kentucky/Monticello
America/Knox_IN
America/La_Paz
America/Lima
America/Los_Angeles
America/Louisville
America/Maceio
America/Managua
America/Manaus
America/Marigot
America/Martinique
America/Mazatlan
America/Mendoza
America/Menominee
America/Merida
America/Mexico_City
America/Miquelon
America/Moncton
America/Monterrey
America/Montevideo
America/Montreal
America/Montserrat
America/Nassau
America/New_York
America/Nipigon
America/Nome
America/Noronha
America/North_Dakota/Center
America/North_Dakota/New_Salem
America/Panama
America/Pangnirtung
America/Paramaribo
America/Phoenix
America/Port-au-Prince
America/Port_of_Spain
America/Porto_Acre
America/Porto_Velho
America/Puerto_Rico
America/Rainy_River
America/Rankin_Inlet
America/Recife
America/Regina
America/Resolute
America/Rio_Branco
America/Rosario
America/Santarem
America/Santiago
America/Santo_Domingo
America/Sao_Paulo
America/Scoresbysund
America/Shiprock
America/St_Barthelemy
America/St_Johns
America/St_Kitts
America/St_Lucia
America/St_Thomas
America/St_Vincent
America/Swift_Current
America/Tegucigalpa
America/Thule
America/Thunder_Bay
America/Tijuana
America/Toronto
America/Tortola
America/Vancouver
America/Virgin
America/Whitehorse
America/Winnipeg
America/Yakutat
America/Yellowknife
Antarctica/Casey
Antarctica/Davis
Antarctica/DumontDUrville
Antarctica/Mawson
Antarctica/McMurdo
Antarctica/Palmer
Antarctica/Rothera
Antarctica/South_Pole
Antarctica/Syowa
Antarctica/Vostok
Arctic/Longyearbyen
Asia/Aden
Asia/Almaty
Asia/Amman
Asia/Anadyr
Asia/Aqtau
Asia/Aqtobe
Asia/Ashgabat
Asia/Ashkhabad
Asia/Baghdad
Asia/Bahrain
Asia/Baku
Asia/Bangkok
Asia/Beirut
Asia/Bishkek
Asia/Brunei
Asia/Calcutta
Asia/Choibalsan
Asia/Chongqing
Asia/Chungking
Asia/Colombo
Asia/Dacca
Asia/Damascus
Asia/Dhaka
Asia/Dili
Asia/Dubai
Asia/Dushanbe
Asia/Gaza
Asia/Harbin
Asia/Ho_Chi_Minh
Asia/Hong_Kong
Asia/Hovd
Asia/Irkutsk
Asia/Istanbul
Asia/Jakarta
Asia/Jayapura
Asia/Jerusalem
Asia/Kabul
Asia/Kamchatka
Asia/Karachi
Asia/Kashgar
Asia/Kathmandu
Asia/Katmandu
Asia/Kolkata
Asia/Krasnoyarsk
Asia/Kuala_Lumpur
Asia/Kuching
Asia/Kuwait
Asia/Macao
Asia/Macau
Asia/Magadan
Asia/Makassar
Asia/Manila
Asia/Muscat
Asia/Nicosia
Asia/Novokuznetsk
Asia/Novosibirsk
Asia/Omsk
Asia/Oral
Asia/Phnom_Penh
Asia/Pontianak
Asia/Pyongyang
Asia/Qatar
Asia/Qyzylorda
Asia/Rangoon
Asia/Riyadh
Asia/Riyadh87
Asia/Riyadh88
Asia/Riyadh89
Asia/Saigon
Asia/Sakhalin
Asia/Samarkand
Asia/Seoul
Asia/Shanghai
Asia/Singapore
Asia/Taipei
Asia/Tashkent
Asia/Tbilisi
Asia/Tehran
Asia/Tel_Aviv
Asia/Thimbu
Asia/Thimphu
Asia/Tokyo
Asia/Ujung_Pandang
Asia/Ulaanbaatar
Asia/Ulan_Bator
Asia/Urumqi
Asia/Vientiane
Asia/Vladivostok
Asia/Yakutsk
Asia/Yekaterinburg
Asia/Yerevan
Atlantic/Azores
Atlantic/Bermuda
Atlantic/Canary
Atlantic/Cape_Verde
Atlantic/Faeroe
Atlantic/Faroe
Atlantic/Jan_Mayen
Atlantic/Madeira
Atlantic/Reykjavik
Atlantic/South_Georgia
Atlantic/St_Helena
Atlantic/Stanley
Australia/ACT
Australia/Adelaide
Australia/Brisbane
Australia/Broken_Hill
Australia/Canberra
Australia/Currie
Australia/Darwin
Australia/Eucla
Australia/Hobart
Australia/LHI
Australia/Lindeman
Australia/Lord_Howe
Australia/Melbourne
Australia/NSW
Australia/North
Australia/Perth
Australia/Queensland
Australia/South
Australia/Sydney
Australia/Tasmania
Australia/Victoria
Australia/West
Australia/Yancowinna
BET
BST
Brazil/Acre
Brazil/DeNoronha
Brazil/East
Brazil/West
CAT
CET
CNT
CST
CST6CDT
CTT
Canada/Atlantic
Canada/Central
Canada/East-Saskatchewan
Canada/Eastern
Canada/Mountain
Canada/Newfoundland
Canada/Pacific
Canada/Saskatchewan
Canada/Yukon
Chile/Continental
Chile/EasterIsland
Cuba
EAT
ECT
EET
EST
EST5EDT
Egypt
Eire
Etc/GMT
Etc/GMT+0
Etc/GMT+1
Etc/GMT+10
Etc/GMT+11
Etc/GMT+12
Etc/GMT+2
Etc/GMT+3
Etc/GMT+4
Etc/GMT+5
Etc/GMT+6
Etc/GMT+7
Etc/GMT+8
Etc/GMT+9
Etc/GMT-0
Etc/GMT-1
Etc/GMT-10
Etc/GMT-11
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Etc/GMT-2
Etc/GMT-3
Etc/GMT-4
Etc/GMT-5
Etc/GMT-6
Etc/GMT-7
Etc/GMT-8
Etc/GMT-9
Etc/GMT0
Etc/Greenwich
Etc/UCT
Etc/UTC
Etc/Universal
Etc/Zulu
Europe/Amsterdam
Europe/Andorra
Europe/Athens
Europe/Belfast
Europe/Belgrade
Europe/Berlin
Europe/Bratislava
Europe/Brussels
Europe/Bucharest
Europe/Budapest
Europe/Chisinau
Europe/Copenhagen
Europe/Dublin
Europe/Gibraltar
Europe/Guernsey
Europe/Helsinki
Europe/Isle_of_Man
Europe/Istanbul
Europe/Jersey
Europe/Kaliningrad
Europe/Kiev
Europe/Lisbon
Europe/Ljubljana
Europe/London
Europe/Luxembourg
Europe/Madrid
Europe/Malta
Europe/Mariehamn
Europe/Minsk
Europe/Monaco
Europe/Moscow
Europe/Nicosia
Europe/Oslo
Europe/Paris
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/Samara
Europe/San_Marino
Europe/Sarajevo
Europe/Simferopol
Europe/Skopje
Europe/Sofia
Europe/Stockholm
Europe/Tallinn
Europe/Tirane
Europe/Tiraspol
Europe/Uzhgorod
Europe/Vaduz
Europe/Vatican
Europe/Vienna
Europe/Vilnius
Europe/Volgograd
Europe/Warsaw
Europe/Zagreb
Europe/Zaporozhye
Europe/Zurich
GB
GB-Eire
GMT
GMT0
Greenwich
HST
Hongkong
IET
IST
Iceland
Indian/Antananarivo
Indian/Chagos
Indian/Christmas
Indian/Cocos
Indian/Comoro
Indian/Kerguelen
Indian/Mahe
Indian/Maldives
Indian/Mauritius
Indian/Mayotte
Indian/Reunion
Iran
Israel
JST
Jamaica
Japan
Kwajalein
Libya
MET
MIT
MST
MST7MDT
Mexico/BajaNorte
Mexico/BajaSur
Mexico/General
Mideast/Riyadh87
Mideast/Riyadh88
Mideast/Riyadh89
NET
NST
NZ
NZ-CHAT
Navajo
PLT
PNT
PRC
PRT
PST
PST8PDT
Pacific/Apia
Pacific/Auckland
Pacific/Chatham
Pacific/Easter
Pacific/Efate
Pacific/Enderbury
Pacific/Fakaofo
Pacific/Fiji
Pacific/Funafuti
Pacific/Galapagos
Pacific/Gambier
Pacific/Guadalcanal
Pacific/Guam
Pacific/Honolulu
Pacific/Johnston
Pacific/Kiritimati
Pacific/Kosrae
Pacific/Kwajalein
Pacific/Majuro
Pacific/Marquesas
Pacific/Midway
Pacific/Nauru
Pacific/Niue
Pacific/Norfolk
Pacific/Noumea
Pacific/Pago_Pago
Pacific/Palau
Pacific/Pitcairn
Pacific/Ponape
Pacific/Port_Moresby
Pacific/Rarotonga
Pacific/Saipan
Pacific/Samoa
Pacific/Tahiti
Pacific/Tarawa
Pacific/Tongatapu
Pacific/Truk
Pacific/Wake
Pacific/Wallis
Pacific/Yap
Poland
Portugal
ROK
SST
Singapore
SystemV/AST4
SystemV/AST4ADT
SystemV/CST6
SystemV/CST6CDT
SystemV/EST5
SystemV/EST5EDT
SystemV/HST10
SystemV/MST7
SystemV/MST7MDT
SystemV/PST8
SystemV/PST8PDT
SystemV/YST9
SystemV/YST9YDT
Turkey
UCT
US/Alaska
US/Aleutian
US/Arizona
US/Central
US/East-Indiana
US/Eastern
US/Hawaii
US/Indiana-Starke
US/Michigan
US/Mountain
US/Pacific
US/Pacific-New
US/Samoa
UTC
Universal
VST
W-SU
WET
Zulu
包括Date、Calendar、GregorianCalendar、Locale、TimeZone、Currency六个类。下面的代码可以了解这些类的基本用法。更加详细的用法,涉及到具体的函数操作,请查看JDK。
(在Date()中很多方法已经过时,鼓励使用Calendar类来实现时间函数。)
package com.java.util; import java.util.Arrays; import java.util.Calendar; import java.util.Currency; import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; public class MyCalendar { public static void main(String[] args) { System.out.println("---------------- Date Calendar GregorianCalendar ----------------"); Calendar localTime = Calendar.getInstance(); int hour = localTime.get(Calendar.HOUR); int minute = localTime.get(Calendar.MINUTE); int second = localTime.get(Calendar.SECOND); System.out.println("Local Time:\t" + hour + ":" + minute + ":" + second); Calendar chineseTime = new GregorianCalendar(TimeZone.getTimeZone("Asia/Shanghai")); chineseTime.setTimeInMillis(localTime.getTimeInMillis()); hour = chineseTime.get(Calendar.HOUR); minute = chineseTime.get(Calendar.MINUTE); second = chineseTime.get(Calendar.SECOND); System.out.println("Chinese Time:\t" + hour + ":" + minute + ":" + second); Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("Europe/Dublin")); calendar.setTime(new Date()); hour = calendar.get(Calendar.HOUR); minute = calendar.get(Calendar.MINUTE); second = calendar.get(Calendar.SECOND); System.out.println("Local Time:\t" + hour + ":" + minute + ":" + second); System.out.println("---------------- Currency ----------------"); Currency currency = Currency.getInstance(Locale.CHINA); System.out.println(currency.getCurrencyCode()); System.out.println("---------------- Available Locales ----------------"); Locale[] locales = Locale.getAvailableLocales(); for(Locale locale : locales){ System.out.println(locale.getDisplayName()); } System.out.println("---------------- Available TimeZone IDs ----------------"); String[] timezones = TimeZone.getAvailableIDs(); Arrays.sort(timezones); for(String timezone : timezones){ System.out.println(timezone); } } }
结果:
---------------- Date Calendar GregorianCalendar ----------------
Local Time: 2:52:10
Chinese Time: 9:52:10
Local Time: 2:52:10
---------------- Currency ----------------
CNY
---------------- Available Locales ----------------
Japanese (Japan)
Spanish (Peru)
English
Japanese (Japan,JP)
Spanish (Panama)
Serbian (Bosnia and Herzegovina)
Macedonian
Spanish (Guatemala)
Arabic (United Arab Emirates)
Norwegian (Norway)
Albanian (Albania)
Bulgarian
Arabic (Iraq)
Arabic (Yemen)
Hungarian
Portuguese (Portugal)
Greek (Cyprus)
Arabic (Qatar)
Macedonian (Macedonia)
Swedish
German (Switzerland)
English (United States)
Finnish (Finland)
Icelandic
Czech
English (Malta)
Slovenian (Slovenia)
Slovak (Slovakia)
Italian
Turkish (Turkey)
Chinese
Thai
Arabic (Saudi Arabia)
Norwegian
English (United Kingdom)
Serbian (Serbia and Montenegro)
Lithuanian
Romanian
English (New Zealand)
Norwegian (Norway,Nynorsk)
Lithuanian (Lithuania)
Spanish (Nicaragua)
Dutch
Irish (Ireland)
French (Belgium)
Spanish (Spain)
Arabic (Lebanon)
Korean
French (Canada)
Estonian (Estonia)
Arabic (Kuwait)
Serbian (Serbia)
Spanish (United States)
Spanish (Mexico)
Arabic (Sudan)
Indonesian (Indonesia)
Russian
Latvian
Spanish (Uruguay)
Latvian (Latvia)
Hebrew
Portuguese (Brazil)
Arabic (Syria)
Croatian
Estonian
Spanish (Dominican Republic)
French (Switzerland)
Hindi (India)
Spanish (Venezuela)
Arabic (Bahrain)
English (Philippines)
Arabic (Tunisia)
Finnish
German (Austria)
Spanish
Dutch (Netherlands)
Spanish (Ecuador)
Chinese (Taiwan)
Arabic (Jordan)
Belarusian
Icelandic (Iceland)
Spanish (Colombia)
Spanish (Costa Rica)
Spanish (Chile)
Arabic (Egypt)
English (South Africa)
Thai (Thailand)
Greek (Greece)
Italian (Italy)
Catalan
Hungarian (Hungary)
French
English (Ireland)
Ukrainian (Ukraine)
Polish (Poland)
French (Luxembourg)
Dutch (Belgium)
English (India)
Catalan (Spain)
Arabic (Morocco)
Spanish (Bolivia)
English (Australia)
Serbian
Chinese (Singapore)
Portuguese
Ukrainian
Spanish (El Salvador)
Russian (Russia)
Korean (South Korea)
Vietnamese
Arabic (Algeria)
Vietnamese (Vietnam)
Serbian (Montenegro)
Albanian
Arabic (Libya)
Arabic
Chinese (China)
Belarusian (Belarus)
Chinese (Hong Kong)
Japanese
Hebrew (Israel)
Bulgarian (Bulgaria)
Indonesian
Maltese (Malta)
Spanish (Paraguay)
Slovenian
French (France)
Czech (Czech Republic)
Italian (Switzerland)
Romanian (Romania)
Spanish (Puerto Rico)
English (Canada)
German (Germany)
Irish
German (Luxembourg)
German
Spanish (Argentina)
Slovak
Malay (Malaysia)
Croatian (Croatia)
English (Singapore)
Danish
Maltese
Polish
Arabic (Oman)
Turkish
Thai (Thailand,TH)
Greek
Malay
Swedish (Sweden)
Danish (Denmark)
Spanish (Honduras)
---------------- Available TimeZone IDs ----------------
ACT
AET
AGT
ART
AST
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
Africa/Gaborone
Africa/Harare
Africa/Johannesburg
Africa/Kampala
Africa/Khartoum
Africa/Kigali
Africa/Kinshasa
Africa/Lagos
Africa/Libreville
Africa/Lome
Africa/Luanda
Africa/Lubumbashi
Africa/Lusaka
Africa/Malabo
Africa/Maputo
Africa/Maseru
Africa/Mbabane
Africa/Mogadishu
Africa/Monrovia
Africa/Nairobi
Africa/Ndjamena
Africa/Niamey
Africa/Nouakchott
Africa/Ouagadougou
Africa/Porto-Novo
Africa/Sao_Tome
Africa/Timbuktu
Africa/Tripoli
Africa/Tunis
Africa/Windhoek
America/Adak
America/Anchorage
America/Anguilla
America/Antigua
America/Araguaina
America/Argentina/Buenos_Aires
America/Argentina/Catamarca
America/Argentina/ComodRivadavia
America/Argentina/Cordoba
America/Argentina/Jujuy
America/Argentina/La_Rioja
America/Argentina/Mendoza
America/Argentina/Rio_Gallegos
America/Argentina/Salta
America/Argentina/San_Juan
America/Argentina/San_Luis
America/Argentina/Tucuman
America/Argentina/Ushuaia
America/Aruba
America/Asuncion
America/Atikokan
America/Atka
America/Bahia
America/Barbados
America/Belem
America/Belize
America/Blanc-Sablon
America/Boa_Vista
America/Bogota
America/Boise
America/Buenos_Aires
America/Cambridge_Bay
America/Campo_Grande
America/Cancun
America/Caracas
America/Catamarca
America/Cayenne
America/Cayman
America/Chicago
America/Chihuahua
America/Coral_Harbour
America/Cordoba
America/Costa_Rica
America/Cuiaba
America/Curacao
America/Danmarkshavn
America/Dawson
America/Dawson_Creek
America/Denver
America/Detroit
America/Dominica
America/Edmonton
America/Eirunepe
America/El_Salvador
America/Ensenada
America/Fort_Wayne
America/Fortaleza
America/Glace_Bay
America/Godthab
America/Goose_Bay
America/Grand_Turk
America/Grenada
America/Guadeloupe
America/Guatemala
America/Guayaquil
America/Guyana
America/Halifax
America/Havana
America/Hermosillo
America/Indiana/Indianapolis
America/Indiana/Knox
America/Indiana/Marengo
America/Indiana/Petersburg
America/Indiana/Tell_City
America/Indiana/Vevay
America/Indiana/Vincennes
America/Indiana/Winamac
America/Indianapolis
America/Inuvik
America/Iqaluit
America/Jamaica
America/Jujuy
America/Juneau
America/Kentucky/Louisville
America/Kentucky/Monticello
America/Knox_IN
America/La_Paz
America/Lima
America/Los_Angeles
America/Louisville
America/Maceio
America/Managua
America/Manaus
America/Marigot
America/Martinique
America/Mazatlan
America/Mendoza
America/Menominee
America/Merida
America/Mexico_City
America/Miquelon
America/Moncton
America/Monterrey
America/Montevideo
America/Montreal
America/Montserrat
America/Nassau
America/New_York
America/Nipigon
America/Nome
America/Noronha
America/North_Dakota/Center
America/North_Dakota/New_Salem
America/Panama
America/Pangnirtung
America/Paramaribo
America/Phoenix
America/Port-au-Prince
America/Port_of_Spain
America/Porto_Acre
America/Porto_Velho
America/Puerto_Rico
America/Rainy_River
America/Rankin_Inlet
America/Recife
America/Regina
America/Resolute
America/Rio_Branco
America/Rosario
America/Santarem
America/Santiago
America/Santo_Domingo
America/Sao_Paulo
America/Scoresbysund
America/Shiprock
America/St_Barthelemy
America/St_Johns
America/St_Kitts
America/St_Lucia
America/St_Thomas
America/St_Vincent
America/Swift_Current
America/Tegucigalpa
America/Thule
America/Thunder_Bay
America/Tijuana
America/Toronto
America/Tortola
America/Vancouver
America/Virgin
America/Whitehorse
America/Winnipeg
America/Yakutat
America/Yellowknife
Antarctica/Casey
Antarctica/Davis
Antarctica/DumontDUrville
Antarctica/Mawson
Antarctica/McMurdo
Antarctica/Palmer
Antarctica/Rothera
Antarctica/South_Pole
Antarctica/Syowa
Antarctica/Vostok
Arctic/Longyearbyen
Asia/Aden
Asia/Almaty
Asia/Amman
Asia/Anadyr
Asia/Aqtau
Asia/Aqtobe
Asia/Ashgabat
Asia/Ashkhabad
Asia/Baghdad
Asia/Bahrain
Asia/Baku
Asia/Bangkok
Asia/Beirut
Asia/Bishkek
Asia/Brunei
Asia/Calcutta
Asia/Choibalsan
Asia/Chongqing
Asia/Chungking
Asia/Colombo
Asia/Dacca
Asia/Damascus
Asia/Dhaka
Asia/Dili
Asia/Dubai
Asia/Dushanbe
Asia/Gaza
Asia/Harbin
Asia/Ho_Chi_Minh
Asia/Hong_Kong
Asia/Hovd
Asia/Irkutsk
Asia/Istanbul
Asia/Jakarta
Asia/Jayapura
Asia/Jerusalem
Asia/Kabul
Asia/Kamchatka
Asia/Karachi
Asia/Kashgar
Asia/Kathmandu
Asia/Katmandu
Asia/Kolkata
Asia/Krasnoyarsk
Asia/Kuala_Lumpur
Asia/Kuching
Asia/Kuwait
Asia/Macao
Asia/Macau
Asia/Magadan
Asia/Makassar
Asia/Manila
Asia/Muscat
Asia/Nicosia
Asia/Novokuznetsk
Asia/Novosibirsk
Asia/Omsk
Asia/Oral
Asia/Phnom_Penh
Asia/Pontianak
Asia/Pyongyang
Asia/Qatar
Asia/Qyzylorda
Asia/Rangoon
Asia/Riyadh
Asia/Riyadh87
Asia/Riyadh88
Asia/Riyadh89
Asia/Saigon
Asia/Sakhalin
Asia/Samarkand
Asia/Seoul
Asia/Shanghai
Asia/Singapore
Asia/Taipei
Asia/Tashkent
Asia/Tbilisi
Asia/Tehran
Asia/Tel_Aviv
Asia/Thimbu
Asia/Thimphu
Asia/Tokyo
Asia/Ujung_Pandang
Asia/Ulaanbaatar
Asia/Ulan_Bator
Asia/Urumqi
Asia/Vientiane
Asia/Vladivostok
Asia/Yakutsk
Asia/Yekaterinburg
Asia/Yerevan
Atlantic/Azores
Atlantic/Bermuda
Atlantic/Canary
Atlantic/Cape_Verde
Atlantic/Faeroe
Atlantic/Faroe
Atlantic/Jan_Mayen
Atlantic/Madeira
Atlantic/Reykjavik
Atlantic/South_Georgia
Atlantic/St_Helena
Atlantic/Stanley
Australia/ACT
Australia/Adelaide
Australia/Brisbane
Australia/Broken_Hill
Australia/Canberra
Australia/Currie
Australia/Darwin
Australia/Eucla
Australia/Hobart
Australia/LHI
Australia/Lindeman
Australia/Lord_Howe
Australia/Melbourne
Australia/NSW
Australia/North
Australia/Perth
Australia/Queensland
Australia/South
Australia/Sydney
Australia/Tasmania
Australia/Victoria
Australia/West
Australia/Yancowinna
BET
BST
Brazil/Acre
Brazil/DeNoronha
Brazil/East
Brazil/West
CAT
CET
CNT
CST
CST6CDT
CTT
Canada/Atlantic
Canada/Central
Canada/East-Saskatchewan
Canada/Eastern
Canada/Mountain
Canada/Newfoundland
Canada/Pacific
Canada/Saskatchewan
Canada/Yukon
Chile/Continental
Chile/EasterIsland
Cuba
EAT
ECT
EET
EST
EST5EDT
Egypt
Eire
Etc/GMT
Etc/GMT+0
Etc/GMT+1
Etc/GMT+10
Etc/GMT+11
Etc/GMT+12
Etc/GMT+2
Etc/GMT+3
Etc/GMT+4
Etc/GMT+5
Etc/GMT+6
Etc/GMT+7
Etc/GMT+8
Etc/GMT+9
Etc/GMT-0
Etc/GMT-1
Etc/GMT-10
Etc/GMT-11
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Etc/GMT-2
Etc/GMT-3
Etc/GMT-4
Etc/GMT-5
Etc/GMT-6
Etc/GMT-7
Etc/GMT-8
Etc/GMT-9
Etc/GMT0
Etc/Greenwich
Etc/UCT
Etc/UTC
Etc/Universal
Etc/Zulu
Europe/Amsterdam
Europe/Andorra
Europe/Athens
Europe/Belfast
Europe/Belgrade
Europe/Berlin
Europe/Bratislava
Europe/Brussels
Europe/Bucharest
Europe/Budapest
Europe/Chisinau
Europe/Copenhagen
Europe/Dublin
Europe/Gibraltar
Europe/Guernsey
Europe/Helsinki
Europe/Isle_of_Man
Europe/Istanbul
Europe/Jersey
Europe/Kaliningrad
Europe/Kiev
Europe/Lisbon
Europe/Ljubljana
Europe/London
Europe/Luxembourg
Europe/Madrid
Europe/Malta
Europe/Mariehamn
Europe/Minsk
Europe/Monaco
Europe/Moscow
Europe/Nicosia
Europe/Oslo
Europe/Paris
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/Samara
Europe/San_Marino
Europe/Sarajevo
Europe/Simferopol
Europe/Skopje
Europe/Sofia
Europe/Stockholm
Europe/Tallinn
Europe/Tirane
Europe/Tiraspol
Europe/Uzhgorod
Europe/Vaduz
Europe/Vatican
Europe/Vienna
Europe/Vilnius
Europe/Volgograd
Europe/Warsaw
Europe/Zagreb
Europe/Zaporozhye
Europe/Zurich
GB
GB-Eire
GMT
GMT0
Greenwich
HST
Hongkong
IET
IST
Iceland
Indian/Antananarivo
Indian/Chagos
Indian/Christmas
Indian/Cocos
Indian/Comoro
Indian/Kerguelen
Indian/Mahe
Indian/Maldives
Indian/Mauritius
Indian/Mayotte
Indian/Reunion
Iran
Israel
JST
Jamaica
Japan
Kwajalein
Libya
MET
MIT
MST
MST7MDT
Mexico/BajaNorte
Mexico/BajaSur
Mexico/General
Mideast/Riyadh87
Mideast/Riyadh88
Mideast/Riyadh89
NET
NST
NZ
NZ-CHAT
Navajo
PLT
PNT
PRC
PRT
PST
PST8PDT
Pacific/Apia
Pacific/Auckland
Pacific/Chatham
Pacific/Easter
Pacific/Efate
Pacific/Enderbury
Pacific/Fakaofo
Pacific/Fiji
Pacific/Funafuti
Pacific/Galapagos
Pacific/Gambier
Pacific/Guadalcanal
Pacific/Guam
Pacific/Honolulu
Pacific/Johnston
Pacific/Kiritimati
Pacific/Kosrae
Pacific/Kwajalein
Pacific/Majuro
Pacific/Marquesas
Pacific/Midway
Pacific/Nauru
Pacific/Niue
Pacific/Norfolk
Pacific/Noumea
Pacific/Pago_Pago
Pacific/Palau
Pacific/Pitcairn
Pacific/Ponape
Pacific/Port_Moresby
Pacific/Rarotonga
Pacific/Saipan
Pacific/Samoa
Pacific/Tahiti
Pacific/Tarawa
Pacific/Tongatapu
Pacific/Truk
Pacific/Wake
Pacific/Wallis
Pacific/Yap
Poland
Portugal
ROK
SST
Singapore
SystemV/AST4
SystemV/AST4ADT
SystemV/CST6
SystemV/CST6CDT
SystemV/EST5
SystemV/EST5EDT
SystemV/HST10
SystemV/MST7
SystemV/MST7MDT
SystemV/PST8
SystemV/PST8PDT
SystemV/YST9
SystemV/YST9YDT
Turkey
UCT
US/Alaska
US/Aleutian
US/Arizona
US/Central
US/East-Indiana
US/Eastern
US/Hawaii
US/Indiana-Starke
US/Michigan
US/Mountain
US/Pacific
US/Pacific-New
US/Samoa
UTC
Universal
VST
W-SU
WET
Zulu
发表评论
-
Java.lang包
2010-09-30 11:33 1502在前面分开的说了下Java.lang.Thread和Java. ... -
java.net
2010-09-18 19:12 12461. URL 类 URL 代表一个统一资源定位符,它是指向互联 ... -
java.io
2010-09-16 16:16 1228Java中比较丰富的I/O操作,使得Java能够被众多公司接受 ... -
Java.lang.Thread 和 Java.lang.ThreadGroup
2010-08-19 23:26 5678多线程 线程:是指进程中的一个执行流程。 线程与进程的区别 ... -
java.util.Scanner 和 Random
2010-08-19 21:58 11331.java util包下的Scanner类,为java的终端 ... -
java.awt
2010-08-19 18:40 15921. Robot Robot 类可以帮我模拟鼠标事件。 ... -
java.util.regex
2010-08-19 18:35 1068Java的正则表达式是如此的强大,能够帮我们做很多东西,而这如 ...
相关推荐
在Java编程语言中,处理日期和时间时经常使用到`java.util.Date`和`java.sql.Date`这两个类。它们虽然名字相似,但在实际应用中有很大的区别。 - **`java.util.Date`**:这个类提供了创建和操作日期/时间的功能,它...
在Java编程语言中,`java.util.InputMismatchException`是一个常见的运行时异常,它通常发生在尝试从数据源(如控制台、文件或数据库)读取数据时,遇到的数据类型与预期的不匹配。在这个特定的场景中,问题出在主线...
标题“java.util.pdf”暗示这是一个关于Java编程语言中util包的文档。由于描述和标签均重复标题,我们可以推断文档重点在于解释和示例展示java.util包中的类与接口。java.util是Java的标准库中的一个包,主要用于...
Java编程语言提供了两个重要的日期处理类,分别是`java.util.Date`和`java.sql.Date`,它们在处理日期和时间上有着不同的特性和用途。 `java.util.Date`是更通用的日期时间类,它包含了日期和时间的信息,可以精确...
Java提供了多个类和接口来处理日期和时间,其中`java.util.Date`和`java.sql.Date`是两个经常被混淆和讨论的类,尤其是在数据库编程中。由于这两个类在概念和功能上有所不同,理解它们之间的区别对于编写有效的Java...
Java.util包是Java标准库中的核心包之一,它包含了大量用于日常编程的工具类和接口。这个包在Java 2版本中得到了显著增强,引入了许多重要的数据结构和算法,为Java程序员提供了更丰富的功能。 首先,Java.util包中...
在Java编程语言中,`java.util.zip` 是一个非常重要的包,它提供了处理各种压缩格式(如ZIP和GZ)的工具。在这个场景中,我们将深入探讨如何使用这个包来解压缩和压缩ZIP格式的文件。`java.util.zip` 包包含几个关键...
标题中提到了“java.util.concurrent.uml.pdf”,这表明文件是一份Java并发编程工具包java.util.concurrent的UML(统一建模语言)类结构图的PDF格式文件。UML图能够帮助开发者理解Java并发包中的类、接口及其关系,...
Java.util.Collection类是Java编程语言中的一个基础类库,提供了许多有用的方法来操作集合对象。Collection类包含了许多静态方法,可以对集合进行排序、混排、反转、替换等操作。 1. Overview Java.util....
在Java编程语言中,`java.util.Calendar`类是处理日期和时间的重要工具之一。通过`Calendar`类,我们可以轻松地获取、操作和解析日期及时间数据。本文将深入探讨如何利用`java.util.Calendar`来计算特定日期,如今天...
在Java编程语言中,对文件进行压缩和解压缩是一项常见的任务。`java.util.zip`包提供了基础的压缩功能,但默认情况下,它可能无法正确处理包含中文文件名的情况。为了解决这个问题,开发者有时需要对原始源码进行...
在Java编程语言中,`java.util.zip`包提供了对压缩文件格式的支持,如ZIP和GZ等。然而,早期版本的Java在处理包含非ASCII字符(例如中文字符)的文件名时存在一些问题。这是因为ZIP文件格式本身是支持Unicode编码的...
Java.util包是一个非常重要的标准库之一,其中包含了大量有用的类和接口,为开发者提供了丰富的功能。此包中的类和接口可以分为以下几大类别: 1. **集合框架**: - **Collection**:这是一个接口,所有集合类的根...
在Java编程语言中,`java.util.zip`包提供了一系列类和接口,用于处理ZIP文件格式。这个包的主要目的是为了方便地进行文件的压缩和解压缩操作。`Zipper`类是一个自定义的类,它利用了`java.util.zip`包中的功能来...
本教程将深入讲解如何利用Java.util包和Java.text包中的类进行日历调整、时间调整以及时间预测。提供的10个源代码文件将帮助你实践并理解这些概念。 首先,让我们关注`Java.util.Calendar`类。这个类是日期和时间的...
Java.util包是Java编程语言中的核心包之一,它包含了大量用于日常编程的类和接口,是Java程序员必备的知识点。本教程重点讲解了Java.util包中的主要组件和使用方法,旨在帮助初学者深入理解并熟练运用这个包。 1. *...
`java.util.stream` 包包含了 Stream 的主要接口和类,如 `Stream`、`IntStream`、`DoubleStream` 等,以及支持流操作的辅助类如 `Collectors`。Stream 操作分为中间操作(Intermediate Operations)和终端操作...