摘要: 使用String#split()方法 如下所示: String string = "004-034556"; String[] parts = string.split("-"); String part1 = parts[0]; // 004 String part2 = parts[1]; // 阅读全文
posted @ 2016-09-19 14:24 媛猿 阅读(35269) 评论(0) 推荐(1) 编辑
摘要: 如下面,有两个循环,break只能退出一个for循环,不能直接跳过第二个for循环 for (Type type : types) { for (Type t : types2) { if (some condition) { // Do something and break... break; 阅读全文
posted @ 2016-09-19 14:19 媛猿 阅读(1600) 评论(0) 推荐(0) 编辑