Android 开发之 字符串-数字 转化

来源:互联网 发布:模具cnc编程 是什么 编辑:程序博客网 时间:2024/05/01 17:50


字符串-〉数字

String s;

int i;

i = Integer.getInteger(s);

数字-〉字符串

String s;

int i;

s = String.valueOf(i);

// 或者 s = Integer.toString(i);

字符串-〉数字

String s;

int i;

i = Integer.getInteger(s);

数字-〉字符串

String s;

int i;

s = String.valueOf(i);

// 或者 s = Integer.toString(i);

0 0
原创粉丝点击