0823面试
时间:2021-08-25 08:38:58
收藏:0
阅读:14
string里怎么重写equals的
public boolean equals(Object anObject) {
if (this == anObject) {
return true;
}
if (anObject instanceof String) {
String anotherString = (String)anObject;
int n = value.length;
if (n == anotherString.value.length) {
char v1[] = value;
char v2[] = anotherString.value;
int i = 0;
while (n-- != 0) {
if (v1[i] != v2[i])
return false;
i++;
}
return true;
}
}
return false;
}
mysql引索
b+树与红黑树
为什么要用es
原文:https://www.cnblogs.com/drsyq/p/15183014.html
评论(0)