String str1 = “1.4.3”;
String str2 = “1,4,4”;
String[] Step3 ;
System.out.println(str2);
String[] Step1 = new String[]{};
String[] Step2 = new String[]{};
if (Step1.length >= Step2.length) {
Step3 = new String[Step1.length];
Step3 = Step2;
}else {
Step3 = new String[Step2.length];
Step3 = Step1;
}
Step1 = str1.split(“\\.”);
Step2 = str2.split(“,”);
for (int i = 0; i < Step1.length; i++) {
System.out.println(“++++”+Step1[i]);
}
for (int i = 0; i < Step2.length; i++) {
System.out.println(“0000″+Step2[i]);
String str2 = “1,4,4”;
String[] Step3 ;
System.out.println(str2);
String[] Step1 = new String[]{};
String[] Step2 = new String[]{};
if (Step1.length >= Step2.length) {
Step3 = new String[Step1.length];
Step3 = Step2;
}else {
Step3 = new String[Step2.length];
Step3 = Step1;
}
Step1 = str1.split(“\\.”);
Step2 = str2.split(“,”);
for (int i = 0; i < Step1.length; i++) {
System.out.println(“++++”+Step1[i]);
}
for (int i = 0; i < Step2.length; i++) {
System.out.println(“0000″+Step2[i]);
}
注:使用”\\.”可以用来剪切Android中”.” ,获者将“.”转化为其他字符在剪切
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/119229.html