汉字输入练习 TypeChinese.java
生活随笔
收集整理的這篇文章主要介紹了
汉字输入练习 TypeChinese.java
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
TypeChinese.java
public class TypeChinese {public static void main(String args[]) {char startChar =(char)22909;System.out.println("startChar");System.out.println("輸入漢字練習(xí)(輸入#結(jié)束程序)");System.out.printf("輸入顯示的漢字(回車(chē))\n");Chinese hanzi;hanzi = new Chinese();GiveChineseThread giveHanzi;InputChineseThread typeHanzi;giveHanzi = new GiveChineseThread();giveHanzi.setChinese(hanzi);giveHanzi.setSleepLength(6000);typeHanzi = new InputChineseThread();typeHanzi.setChinese(hanzi);giveHanzi.start();try{Thread.sleep(200);}catch(Exception exp){}typeHanzi.start();} }Chinese.java
public class Chinese { char c ='\0'; public void setChinese(char c) { this.c = c; } public char getChinese() { return c; } }總結(jié)
以上是生活随笔為你收集整理的汉字输入练习 TypeChinese.java的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 密码流 PassWord.java
- 下一篇: 双线程猜数字 TwoThreadGues