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
Ïà¹ØÎĵµ£º
Ù¡Ç¿ http://blog.csdn.net/microtong
OakCMSÄÚÈݹÜÀíϵͳ http://www.oakcms.cn http://www.oakcms.net
Ò»Ôª¶þ´Î·½³Ìax2+bx+c=0£¬ÊäÈëa,b,cÈý¸öϵÊý£¬Çó½â·½³Ì£¬½á¹ûÓÐÈýÖÖÇé¿ö£ºÁ½¸öʵÊý¸ù¡¢Ò»¸öʵÊý¸ù¡¢Á½¸ö¸´Êý¸ù¡£
/**
* Equation.java
*/
package cn.edu.uibe.oop;
/**
* ¼ÆËã ......
ΪÁËʵÏÖÁ½¸öÊý×Ö½øÐн»»»£¬ÎÒÃÇͨ³£¿ÉÒÔÀûÓÃλÔËËãÀ´ÊµÏÖ
C++³ÌÐò swap(int a ,int b){a^=b^=a^=b;}
JAVA³ÌÐò swap(int a, int b){ a^=b;b^=a;a^=b; }»òÕß{ b^=(a^=b) ; a^=b;}
Èç¹ûJAVAÓÃC++µÄʵÏÖ·½Ê½Ôò»áµÃµ½ bµÃµ½ÁËaµÄÖµ£¬µ«ÊÇaÏÖÔÚµÄֵȴ² ......
Java¿ª·¢ÖУ¬×îÖյijÌÐò·¢²¼Ò»°ãÊÇÒª´ò³Éjar°üÐÎʽµÄ£¬¶øÓÐһЩÅäÖÃÎļþÊÇ·ÅÔÚjarÀïÃæµÄ£¬ÕâÑùÔÚ×öFileÐÎʽµÄ¶Áȡʱ£¬¾Í»á·¢ÏÖ¶Á²»µ½ÏàÓ¦µÄÎļþ¡£ÏÂÃæÌṩһÖÖ½â¾ö·½Ê½£ºString fileName = "/config/abcd.config";
InputStream in = getClass().getResourceAsStream(fileName);
BufferedReader br = null;
try{
br = n ......
ÏÈ¿´Ò»¶Î´úÂë
public class Hello{
public static void main(String[] args){
int i = 5 , j = 2;
System.out.println(i+j);
......
ÓÐÁ½ÖÖ·½·¨£º
·½·¨Ò»£ºÓÃjava.util.DateÀàÀ´ÊµÏÖ£¬²¢½áºÏjava.text.DateFormatÀàÀ´ÊµÏÖʱ¼äµÄ¸ñʽ»¯£¬¿´ÏÂÃæ´úÂ룺
import java.util.*;
import java.text.*;
//ÒÔÏÂĬÈÏʱ¼äÈÕÆÚÏÔʾ·½Ê½¶¼ÊǺºÓïÓïÑÔ·½Ê½
//Ò»°ãÓïÑÔ¾ÍĬÈϺºÓï¾Í¿ÉÒÔÁË£¬Ê±¼äÈÕÆÚµÄ¸ñʽĬÈÏΪMEDIUM·ç¸ñ£¬±ÈÈ磺2008-6-16 20:54:53
//ÒÔÏÂÏÔʾµÄÈ ......