Primitive types in Java include integer types, floating-point numbers, [[UTF-16]] code units and a Boolean type. ThereUnlike C++ and C#, there are no unsigned types in Java except <code>char</code> type, which is used to represent UTF-16 code units. The lack of unsigned types is offset by introducing unsigned right shift operation (<code>>>></code>), which is not present in C++, methods such as <code>.toUnsignedInt()</code>. Nevertheless, criticisms have been leveled about the lack of compatibility with C and C++ this causes.<ref>{{cite web|url=http://darksleep.com/player/JavaAndUnsignedTypes.html|first=Sean|last=Owens|title=Java and unsigned int, unsigned short, unsigned byte, unsigned long, etc. (Or rather, the lack thereof)|access-date=April 21, 2010|archive-date=February 20, 2009|archive-url=https://web.archive.org/web/20090220171410/http://darksleep.com/player/JavaAndUnsignedTypes.html|url-status=live}}</ref> <!-- This is a terrible citation. If you have a better one, use it. -->
{| class="wikitable"
Line 1,058:
| N/A
|}
Java does not have support for unsigned integers like C++ and C#. However, Java has methods to treat integer types as unsigned, such as <code>.toUnsignedInt()</code>.
<code>null</code> has no type, neither primitive nor class. Any object type may store <code>null</code>.