- 博客(4)
- 收藏
- 关注
转载 Integer
max() 1 public static int max(int a, int b) { 2 return Math.max(a, b); 3 } 4 5 6 /** 7 *Math 的max方法 8 */ 9 public static int max(int a, int b) { 10 ...
2019-03-19 00:02:00
76
转载 Object
Object类有以下几个方法 equals() 1 /** 2 * Indicates whether some other object is "equal to" this one. 3 * <p> 4 * The {@code equals} method implements an equivalence rel...
2019-03-18 22:25:00
105
转载 《Java编程思想》阅读笔记 —— == 与 != 操作符
对于对象,== 与 !=比较的是引用;对于基本类型,比较的是内容。 public class Equivalence(){ public static void main(String[] args){ Integer n1 = new Integer(47); Integer n2 = new Integer(47); ...
2019-03-05 23:31:00
99
转载 JDK源码阅读(1.8) —— String
String类有两个私有的变量,字符数组value,和整型变量hash(默认为0)。 1 /** The value is used for character storage. */ 2 private final char value[]; 3 4 /** Cache the hash code for the string */ 5 ...
2019-03-05 22:20:00
75
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人