javaÖкº×ÖתƴÒô
´úÂëÈçÏ£º
¡¡¡¡ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
¡¡¡¡package com.example.pinyin.demo2;
¡¡¡¡import net.sourceforge.pinyin4j.PinyinHelper;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
¡¡¡¡import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
¡¡¡¡public class Pinyin {
¡¡¡¡/**
¡¡¡¡* ½«ºº×Öת»»ÎªÈ«Æ´
¡¡¡¡* @param src
¡¡¡¡* @return String
¡¡¡¡*/
¡¡¡¡public static String getPinYin(String src) {
¡¡¡¡ char[] t1 = null;
¡¡¡¡ t1 = src.toCharArray();
¡¡¡¡ // System.out.println(t1.length);
¡¡¡¡ String[] t2 = new String[t1.length];
¡¡¡¡ // System.out.println(t2.length);
¡¡¡¡ // ÉèÖúº×ÖÆ´ÒôÊä³öµÄ¸ñʽ
¡¡¡¡ HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat();
¡¡¡¡ t3.setCaseType(HanyuPinyinCaseType.LOWERCASE);
¡¡¡¡ t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
¡¡¡¡ t3.setVCharType(HanyuPinyinVCharType.WITH_V);
¡¡¡¡ String t4 = "";
¡¡¡¡ int t0 = t1.length;
¡¡¡¡ try {
¡¡¡¡ for (int i = 0; i < t0; i++) {
¡¡¡¡ &n
Ïà¹ØÎĵµ£º
³£¿´µ½ºÜ¶àÈËÌÖÂÛjavaÖйØÓÚStringµÄÎÊÌâ,ÎÒÒ²¾ÍÓеãÐËȤÁË,¼øÓÚÍøÉϺܶàÈËдµÄ¶¼²î±ðºÜ´ó,
ͬÑùµÄÎÊÌâ¶¼ÊDz»Í¬µÄ˵·¨,ÎÒºÜÃÔºý,»¨ÁËÒ»ÍíÉ϶ÁÁËJava Virtual Machine SpecificationºÍ
The Java Language SpecificationµÄһЩÕ½Ú,×öÁ˺ܶàÊÔÑé,×ܽáÁËһϹØÓÚStringµÄÄÚÈÝ,»¹
ÓкܶàÄÚÈÝÎÒÒ²²»È·¶¨,ÔÚÏÂÃæÒ²¶¼Ìá³öÀ´ÁË,Ï ......
XMLÏÖÔÚÒѾ³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ¾ – ÿÖܶ¼ÓÐÐÂÎÄÕ·¢±í.
4.[http ......
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:ËÎÌå;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@SimSun&qu ......