FAQ

Java

JSP

Servlet


Advertisement



Are all values of the Java integral types signed number?

The answer is no.

According to Java Langauge Specificiation, the integral types defined in Java are byte, short, int, long, and char. The values of byte, short, int, and long are signed two's-complement integers, but the values of char are 16-bit unsigned integers which represents UTF-16 code units.

There is no "unsigned" keyword in Java language. The byte, short, int, and long differ only in the range of value each type can represent.


Printer-friendly version Printer-friendly version | Send this 
article to a friend Mail this to a friend

Previous Next vertical dots separating previous/next from contents/index/pdf Contents

  |   |