What is = =?

>Search this website, no references found

int[] test = {0,1,2,3};
System.out.println("test1[3] ++== 0 is " + (test[3] ++== 0));

>Results:

Test1 [3] = = 0 is false

So it must be some kind of logical operator, but I can't find any documents Searching the Internet does not provide any reference

Please help? Thank you in advance

Solution

The presentation of the text looks like a special case = =, but in fact you should read it as follows:

test [3] == 0

Basically, the result of test [3] will be compared with 0 (i.e. = =)

This basically reads as (test [3] = 3) = = 0, which is false

This is a suffix operator, which is a shortcut to value = value 1

==Is a comparison between two values

The text format is terrible, that's it

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>