ackage shenmixiaozhu;
          import java.sql.Date;
          public class TypeChange {
           
            public TypeChange() {
             }
             //change the string type to the int type
             public static   int stringToInt(String intstr)
             {
               Integer integer;
               integer = Integer.valueOf(intstr);
               return integer.intValue();
             }
             //change int type to the string type
             public static String intToString(int value)
             {
               Integer integer = new Integer(value);
               return integer.toString();
             }
             //change the string type to the float type
             public static   float stringToFloat(String floatstr)
             {
               Float floatee;
               floatee = Float.valueOf(floatstr);
               return floatee.floatValue();
             }
             //change the float type to the string type
             public static String floatToString(float value)
             {
               Float floatee = new Float(value);
               return floatee.toString();
             }
             //change the string type to the sqlDate type
             public static java.sql.Date stringToDate(String dateStr)
             {
               return   java.sql.Date.valueOf(dateStr);
             }
             //change the sqlDate type to the string type
             public static String dateToString(java.sql.Date datee)
             {
               return datee.toString();
             }

             public static void main(String[] args)
             {
               java.sql.Date day ;
               day = TypeChange.stringToDate("2003-11-3");
               String strday = TypeChange.dateToString(day);
               System.out.println(strday);
             }
          }
          posted on 2013-04-10 16:31 姚先進(jìn) 閱讀(182) 評(píng)論(0)  編輯  收藏

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


          網(wǎng)站導(dǎo)航:
           
           
          主站蜘蛛池模板: 新密市| 苏尼特右旗| 南陵县| 简阳市| 建德市| 灌南县| 韩城市| 东明县| 稻城县| 固阳县| 云阳县| 黄陵县| 平武县| 喜德县| 浏阳市| 墨玉县| 奈曼旗| 滦平县| 宜兰市| 达拉特旗| 内丘县| 海淀区| 剑河县| 江陵县| 固镇县| 喜德县| 嫩江县| 恭城| 仁化县| 呼图壁县| 金塔县| 古田县| 天等县| 博野县| 许昌市| 安宁市| 南郑县| 乐东| 客服| 泽州县| 循化|