问答题
本程序将字符数组arr中属于字母(A~Z和a~z)的字符添加到一个字符串str的尾部。
public class exam_52{
public static void main(String[] args) {
char arr[]={’1’,’C’,’d’,’E’,’T’,’s’,’$’,’W’,’#’,’@’,’i’};
String str;
______;
int 1=arr.length;
int i=0;
do{
if(______)
str=str.concat(String.valueOf(arr[i]));
i++;
}
while(______);
System.out.println(str);
}
}
【参考答案】
str=new String() arr[i]>=’A’ && arr[i]<=’Z’ || arr[i]>=’a’ &......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)