<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://coderwiki.org/index.php?action=history&amp;feed=atom&amp;title=Not_equal_to_operator</id>
	<title>Not equal to operator - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://coderwiki.org/index.php?action=history&amp;feed=atom&amp;title=Not_equal_to_operator"/>
	<link rel="alternate" type="text/html" href="http://coderwiki.org/index.php?title=Not_equal_to_operator&amp;action=history"/>
	<updated>2026-05-19T01:39:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://coderwiki.org/index.php?title=Not_equal_to_operator&amp;diff=38&amp;oldid=prev</id>
		<title>Dylan: new</title>
		<link rel="alternate" type="text/html" href="http://coderwiki.org/index.php?title=Not_equal_to_operator&amp;diff=38&amp;oldid=prev"/>
		<updated>2025-08-09T10:28:16Z</updated>

		<summary type="html">&lt;p&gt;new&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;One common [[comparison operator]] is the &amp;#039;&amp;#039;&amp;#039;not equal to operator&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
This operator will return [[Boolean|true]] if the value on the &amp;#039;&amp;#039;&amp;#039;left&amp;#039;&amp;#039;&amp;#039; is &amp;#039;&amp;#039;&amp;#039;different to&amp;#039;&amp;#039;&amp;#039; the value on the &amp;#039;&amp;#039;&amp;#039;right&amp;#039;&amp;#039;&amp;#039; of the operator.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
In most languages, the not equal to operator is represented by a &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; symbol.&lt;br /&gt;
&lt;br /&gt;
== Equivalence to inverting the result of an [[equal to operator]] comparison ==&lt;br /&gt;
These two code snippets generally return exactly the same result:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
boolean a = 5 != 3; // true&lt;br /&gt;
boolean b = !(5 == 3); // also true&lt;br /&gt;
boolean c = a == b; // true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comparison of different types ==&lt;br /&gt;
Most [[programming language|programming languages]] (with the notable exception of [[JavaScript]]) will return [[boolean|false]] if the two values being compared are of a different type.&lt;br /&gt;
&lt;br /&gt;
For example, if we compare the number &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt; with the string &amp;lt;code&amp;gt;&amp;quot;5&amp;quot;&amp;lt;/code&amp;gt;, the result will be &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; because the values were of different types.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;See [[JavaScript equal to operator]] for info on how [[JavaScript]] handles the equal to operator(s).&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
boolean a = 7 == 7; // true&lt;br /&gt;
boolean b = 6 == 7; // false&lt;br /&gt;
boolean c = 5 == &amp;quot;5&amp;quot;; // false... unless you&amp;#039;re using JavaScript!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dylan</name></author>
	</entry>
</feed>