隨筆 - 1, 文章 - 0, 評論 - 0, 引用 - 0
          數(shù)據(jù)加載中……

          int to String,String to int,int to char,char to int

          public class testInt {
              public static  void main(String args[]){
                  
                  //int to String
                  int i=23;
                  String j=Integer.toString(i);
                  System.out.println(j);
                  
                  //String to int
                  String k="42";
                  int l=Integer.parseInt(k);
                  System.out.println(l);
                  
                  //int to char
                  int m=7;
                  char n=(char)m;
                  System.out.println(n);
                  
                  //char to int
                  char p='e';
                  int q=p;
                  System.out.println(q);
              }
                  
          }

          posted on 2009-08-16 11:27 AllenNewOK 閱讀(5816) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 浦东新区| 洱源县| 武陟县| 五大连池市| 桂林市| 五常市| 庆阳市| 隆安县| 托克托县| 东阿县| 碌曲县| 开阳县| 惠水县| 小金县| 陆川县| 广昌县| 广宗县| 斗六市| 横山县| 贵定县| 沾化县| 泽州县| 英吉沙县| 鄂州市| 杭州市| 漾濞| 井冈山市| 中超| 通山县| 科技| 嘉荫县| 舞阳县| 灵丘县| 安溪县| 崇阳县| 富顺县| 雷州市| 宁陕县| 古蔺县| 叙永县| 永顺县|