数据类型转换

String转int

public class Demo {
    static String a="2";
    int c=Integer.parseInt(a);
    
    public static void main(String[] args) {
        System.out.println(new String(a));
    }
}
2

 

posted @ 2016-01-01 17:42  丁少华  阅读(172)  评论(0编辑  收藏  举报