第1个回答 推荐于2018-05-10
这个问题有点难.因为我不知道你的OBJECT数组理是什么?可能是对象.也可能是别的.如果强制转换可会报错的
String数组转成字符串
public String getStr(String[]args){
string str="";
for(int i=0;i<args.length;i++){
str+=(String)args[i];
}
return str;
}
字符数组转换成字符串
public static void main(String[] args) {
String s = "";
String[] ss = {"a","b","c"};
for(String temp:ss) s += temp;
System.out.println(s);
}
java中把int数组转换成String,或者char数组
publicstaticvoid main(String[] args) {
RandomAccessFile file =null;
try {
file =new RandomAccessFile("tom.dat", "rw");
for (int i =1; i <11; i++)
file.writeInt(i);
long p = file.getFilePointer();
for (int i=1; i <11; i++){
file.seek(p - i *4);
System.out.println(file.readInt());
}
} catch (Exception e) {
// TODO: handle exception
} finally {
try {
if (file !=null) {
file.close();
}
} catch (IOException IgnoreWhenClose) {
}
}
}
String数组转换成int数组
int ia=new int[numbers.length];
for(int i=0;i<numbers.length;i++){
ia[i]=Integer.parseInt(numbers[i]);
}
还有好多啊...本回答被提问者和网友采纳