Anonymous Asked in Cars &Transportation · 2 weeks ago

What is === operator in Java?

In weakly typed languages such as JavaScript you can use the strict comparison operator ( === ) because the language allows comparison between variables which have different types. For example, in JavaScript, you won't get a compile error if you do this: var x = 10; var y = 'foo'; console.log(x == y); // false. 20 июн. 2019 г.


What does === mean in Java?

On the other hand === is known as strictly equality operator. It's much similar Java's equality operator (==), which gives compilation error if you compare two variables, whose types are not compatible to each other. In fact, you should always use "===" operator for comparing variables or just for any comparison.

What is the use of === operator?

The strict equality operator ( === ) checks whether its two operands are equal, returning a Boolean result. Unlike the equality operator, the strict equality operator always considers operands of different types to be different.

What does == === mean?

The === operator means "is exactly equal to," matching by both value and data type. The == operator means "is equal to," matching by value only.

What is difference == and === in Java?

== in JavaScript is used for comparing two variables, but it ignores the datatype of variable. === is used for comparing two variables, but this operator also checks datatype and compares two values. Checks the equality of two operands without considering their type.

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours