Yoshua Nahar
Yoshua Nahar

Reputation: 1344

Reason for Integer and Character primitive-wrapper classes naming

Why do Integer and Character deviate from the primitive names int and char?

All other types match:

Rediculous question, but couldn't find an answer for it.

Upvotes: 2

Views: 201

Answers (1)

davidxxx
davidxxx

Reputation: 131376

Simple guess.
All wrapper classes are not abbreviated name but complete names.
Using complete name makes sense for classes as these are designed to represent a concept and abbreviating them is not advised to represent clearly a concept.

On the other hand, I suppose that having a shorthand as int or char may appear as more acceptable for primitive types. They also could choose bool rather than boolean.

Upvotes: 2

Related Questions