Java»ñÈ¡ºº×ÖÈ«Æ´ºÍÊ×Æ´
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* ½«ºº×Öת»¯ÎªÈ«Æ´
*/
public class CnToSpell {
private static Map<String, Integer> spellMap = null;
// ´æ·ÅÉúƧ×ÖºÍÆäÆ´ÒôµÄMap
private static Map<Character, String> uncommonWordsMap = null;
static {
if (spellMap == null) {
spellMap = Collections
.synchronizedMap(new LinkedHashMap<String, Integer>(396));
uncommonWordsMap = Collections
.synchronizedMap(new LinkedHashMap<Character, String>(200));
}
initialize();
initUncommonWords();
}
private CnToSpell1() {
}
/**
* ³õʼ»¯
*/
private static void initialize() {
spellMap.put("’a", -20319);
spellMap.put("’ai", -20317);
spellMap.put("’an", -20304);
spellMap.put("’ang", -20295);
spellMap.put("’ao", -20292);
spellMap.put("ba", -20283);
spellMap.put("bai", -20265);
spellMap.put("ban", -20257);
spellMap.put("bang", -20242);
spellMap.put("bao", -20230);
spellMap.put("bei", -20051);
spellMap.put("ben", -20036);
spellMap.put("beng", -20032);
spellMap.put("bi", -20026);
spellMap.put("bian", -20002);
spellMap.put("biao", -19990);
spellMap.put("bie", -19986);
spellMap.put("bin", -19982);
spellMap.put("bing", -19976);
spellMap.put("bo", -19805);
spellMap.put("bu", -19784);
spellMap.put("ca", -19775);
spellMap.put("cai", -19774);
spellMap.put("can", -19763);
Ïà¹ØÎĵµ£º
Áù¡¢javaµÄÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(Ïê½âequals·½·¨)
/**
* Ïê½âequals·½·¨.
*/
class Equals
{
private int i;
public void setI(int i)
{
this.i = i;
}
public Equals()
{
i = 1;
}
public Equals(int i)
{ ......
µÚÆßÕÂ
¸ß¼¶ÀàÌØÕ÷
static
ÀàÊôÐÔÓɸÃÀàµÄËùÓÐʵÀý¹²Ïí
public static int total=0;
µ±totalËùÊôÀà±»Êý´ÎʵÀý»¯µÄʱºò totalÖ»ÓÐÒ»¸ö¶ø²»ÊǶà¸ö
Ò²¿É¾²Ì¬³õʼ»¯static
public static int total£»
static{
total=100;
}
static±ê¼ÇµÄ±äÁ¿»òÕß·½·¨ÓÉÕû¸öÀà(ËùÓÐʵÀý)¹²Ïí
µ¥×Óģʽ
class Single{
......
µÚ¾ÅÕÂ
»ùÓÚÎı¾µÄjavaÓ¦ÓóÌÐò
inputsreamreader is=new inputstreamreader(system.in)
bufferedreader br=new bufferedreader(is)
s=br.readline();
while(!s.euqal("")){}
FLIE f=new file()
filereader ÒÔ×Ö·ûΪµ¥Î»
bufferedreaderÀàµÄreadline
ÒÔÐÐΪµ¥Î»¶ÁÈëÒ»ÐÐ×Ö·û
filewriterÒÔ×Ö·ûΪµ¥Î»ÏòÎļþд³öÊý¾ ......
Öø×÷Ȩ±£»¤ÉùÃ÷
Chinaitlab¸ß¶ÈÖØÊÓ֪ʶ²úȨ±£»¤²¢×ñÊØÖйú¸÷Ïî֪ʶ²úȨ·¨ÂÉ¡¢·¨¹æºÍ¾ßÓÐÔ¼ÊøÁ¦¹æ·¶ÐÔÎļþ¡£¸ù¾Ý·¨ÂÉ¡¢·¨¹æºÍ¹æ·¶ÐÔÎļþÒªÇó,Chinaitlab
Öƶ¨ÁËÖ¼ÔÚ±£»¤ÖªÊ¶²úȨȨÀûÈ˺Ϸ¨È¨ÒæµÄ´ëÊ©ºÍ²½Ö裬µ±Öø×÷ȨÈ˺Í/»òÒÀ·¨¿ÉÒÔÐÐʹÖø×÷ȨµÄȨÀûÈË£¨ÒÔϼò³Æ“ȨÀûÈË”£©·¢ÏÖÔÚ±¾Õ¾ÍøÒ³µÄÄÚÈÝ»òÏÂ
&nbs ......
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Calculator
{
public static void main(String[] args)
......