JasonLaw

JasonLaw

V2EX 第 484411 号会员,加入于 2020-04-17 11:42:03 +08:00
今日活跃度排名 3522
JasonLaw 最近回复了
1 天前
回复了 lmybill 创建的主题 Java Java 里的 equals 方法
@JasonLaw 它后面也说了

The equals method for class Object implements **the most discriminating possible** equivalence relation on objects; that is, for any non-null reference values x and y, this method returns true if and only if x and y refer to the same object (x == y has the value true). In other words, under the reference equality equivalence relation, each equivalence class only has a single element.
1 天前
回复了 lmybill 创建的主题 Java Java 里的 equals 方法
我不明白你是怎么得出“equals 本来比较的是两个对象是否是同一个对象”这个结论的,可以给一下你的论证吗?

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)

文档上是这么说的。

The equals method implements an equivalence relation on non-null object references:

* It is reflexive: for any non-null reference value x, x.equals(x) should return true.
* It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
* It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
* It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
* For any non-null reference value x, x.equals(null) should return false.
1 天前
回复了 JasonLaw 创建的主题 OpenAI 忍不住吐槽, Google 的 Bard 真的很弱智
@catfly #1

I am an LLM trained to respond in a subset of languages at this time, so I can't assist you with that. Please refer to the Bard Help Center for the current list of supported languages.

Where you can use Bard
Bard is currently available in 3 languages and over 180 countries and territories. We’ll gradually expand to more countries and territories in a way that is consistent with local regulations and our AI principles.

You can use Bard in the following languages:
US English
Japanese
Korean
1 天前
回复了 XIAOKEHK 创建的主题 OpenAI 有人要升级 chatgpt PLUS 的吗?
收多少佣金?
@jifengg #1
@tjmljw #2
谢谢两位的解答😅
9 天前
回复了 gps32251070 创建的主题 程序员 关于面试 MySQL 的疑问
@sadfQED2 #37 这已经脱离了语句本身,网络不行,什么都会慢。还是那句话,这个题目和面试官都很傻逼。
9 天前
回复了 gps32251070 创建的主题 程序员 关于面试 MySQL 的疑问
@xuanbg #22 它只需要找出前两行就行了。如果觉得你是对的,麻烦给一下证据。

9 天前
回复了 gps32251070 创建的主题 程序员 关于面试 MySQL 的疑问
@xuanbg #18 虽然 type 是 ALL ,但是不代表它要扫描所有行。没有 offset 的时候,它只会找出前两行。

9 天前
回复了 gps32251070 创建的主题 程序员 关于面试 MySQL 的疑问
@xuanbg #13 没有索引也没事吧,它只是找出两条,它不在意总量多大,它的时间复杂度不是 O(n),而是 O(1)。
9 天前
回复了 gps32251070 创建的主题 程序员 关于面试 MySQL 的疑问
ta 说负载导致的锁的问题,那具体是什么呢?什么负载?造成了什么锁?
关于   ·   帮助文档   ·   博客   ·   nftychat   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   774 人在线   最高记录 5634   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms · UTC 21:08 · PVG 05:08 · LAX 14:08 · JFK 17:08
Developed with CodeLauncher
♥ Do have faith in what you're doing.