English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

releated to premitive datatype

2006-11-27 00:51:43 · 4 answers · asked by ansh 1 in Computers & Internet Programming & Design

4 answers

all types in java are signed. that's how it was designed. i have found it to be a problem only very rarely.

2006-11-27 01:02:32 · answer #1 · answered by Otis F 7 · 2 0

Good Evening Mr. Ansh

Java uses four integer types and they all are signed, positive and negative values. Java does not support unsigned, positive-only integers because unsigned integers are not necessary in Java.

The concept of unsigned was used in C/C++ to specify the behavior of high-order bit, which defined the sign of an integer when expressed as number.

It's simple, Java manages the meaning of the high-order bit differently by adding a special unsigned right shift operator, therefore there's no need to have an unsigned integer.

2006-11-27 09:23:45 · answer #2 · answered by Sunlight 3 · 1 1

Learn about number sysytems . Very boring to explain.

2006-11-28 01:21:08 · answer #3 · answered by liketoaskq 5 · 0 0

because, some idiot forgot to include it into the language spec.
No other reason really.

2006-11-27 09:18:13 · answer #4 · answered by n0body 4 · 0 1

fedest.com, questions and answers