汉字输入练习 TypeChinese.java
生活随笔
收集整理的這篇文章主要介紹了
汉字输入练习 TypeChinese.java
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
TypeChinese.java
public class TypeChinese {public static void main(String args[]) {char startChar =(char)22909;System.out.println("startChar");System.out.println("輸入漢字練習(輸入#結束程序)");System.out.printf("輸入顯示的漢字(回車)\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; } }總結
以上是生活随笔為你收集整理的汉字输入练习 TypeChinese.java的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 密码流 PassWord.java
- 下一篇: 双线程猜数字 TwoThreadGues