Search

Friday, December 14, 2018

Why Data Types Are Important

Data types are especially important in Java because it is a strongly typed language.
This means that all operations are type checked by the compiler for type compatibility. Illegal operations will not be compiled. Thus, strong type checking helps prevent errors and enhances reliability. To enable strong type checking, all variables, expressions, and values have a type. There is no concept of a “type-less” variable, for example. Furthermore, the type of a value determines what operations are allowed on it. An operation allowed on one type might not be allowed on another.


0 comments:

Post a Comment