摘要: ftp上传不成功,提示501 invalid character in command错误:检查文件名是不是中文字符,若是,请换成英文文件名。 阅读全文
posted @ 2014-01-21 14:36 binbiny 阅读(3642) 评论(0) 推荐(0) 编辑
摘要: 第一种方法:全分割,在取最后一部分String dirDiveded[] = fileName.split("/"); String newName = ""; if(dirDiveded.length > 0){newName = dirDiveded[dirDiveded.length-1]; }第二种方法:使用lastIndexOf()方法,从后向前,直接截取最后一部分String newName= fileName.substring(fileName.lastIndexOf("/")+1); 阅读全文
posted @ 2014-01-21 14:04 binbiny 阅读(4561) 评论(0) 推荐(1) 编辑
摘要: package com.aaa;import java.util.ArrayList;import java.util.Vector;public class ToStringTest { public static void main(String[] args) { ArrayList list=new ArrayList(); list.add("aaa"); list.add("bbb"); list.add("ccc"); System.out.print(list);// 打印结果为:[aaa, bbb, ccc] Vec 阅读全文
posted @ 2014-01-21 13:52 binbiny 阅读(367) 评论(0) 推荐(0) 编辑