摘要: Java中用正则表达式截取字符串中第一个出现的英文左括号之前的字符串。比如:北京市(海淀区)(朝阳区)(西城区),截取结果为:北京市。正则表达式为() A ".*?(?=\\()" B ".*?(?=\()" C ".*(?=\\()" D ".*(?=\()" http://www.cnblogs 阅读全文
posted @ 2019-06-17 11:52 那些年的代码 阅读(35675) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 8 public class Test { public int x; public static void main(String []args) { System. out. println("Value is" + x); } } 对于上面这段代码,以下说法正确的是 阅读全文
posted @ 2019-06-17 11:47 那些年的代码 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 通俗的讲,就是基本数据类型和包装类之间的转换。如: int 类型和 Integer 类的转换 基本数据类型转化成包装类是装箱 (如: int --> Integer)。 包装类转化成基本数据类型就是拆箱 (如:Integer --> int)。 包装类就是引用类型,基本数据类型就是值类型 通过 装箱 阅读全文
posted @ 2019-06-17 11:45 那些年的代码 阅读(2497) 评论(0) 推荐(0) 编辑