當前位置:編程學習大全網 - 網站源碼 - java問題 為什麽我輸入男 if裏的代碼不被執行

java問題 為什麽我輸入男 if裏的代碼不被執行

看壹下==和.eques的區別

這是API的源碼

?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;

} cankao:/gzaqq/article/details/1565275

  • 上一篇:兼客兼職的介紹
  • 下一篇:如何去掉php源碼中的註釋語句
  • copyright 2024編程學習大全網