Review of Java Script Concepts 4th Edition
By David Hsu
Wiley presents us with an intro to Java that presents its core concepts in a comprehensive way.; Its author, Cay Horstmann, teaches at San Jose State University. I used it as textbook for my college courses and am happy to have discovered that his book has greatly aided the writing of my Java tutorial. Consisting of 902 pages divided into 19 chapters, Review of Java Concepts is both well-organized and beginner-friendly.
The different values.
Data in Java are called values.
Each value has a type.
void means no type.
No values exist for this type.
These are non-modifiable types of values, only copied.
New types of primitives cannot be created.
List of primitive types, their possible values, and how much memory they take up:
||-128 … 127(whole numbers)
||4.9E-324 … 1.7976931348623157E308
||1.4E-45 … 3.4028235E38
||-2147483648 … 2147483647(whole numbers)
||-9223372036854775808 … 9223372036854775807(whole numbers)
||-32768 … 32767(whole numbers)
- boolean – Boolean, who pioneered truth logic.
- byte – eight memory “bits.”
- char – character.
- double – doubly as precise as float (meaning more decimal places).
- float – numbers whose decimal points look like floating around, since only the decimal point moves when divided by 10.
- int – integer.
- long – long integer.
- short – short integer.
These are modifiable types of values, also called classes.
New classes can be created by the programmer.
Objects can be set to not be modifiable, like Strings or Enumerators (below).
Class names usually start with a capital letter, which distinguishes from primitive types, which always start lowercase.
These are a lesser used small set of types of objects, set by the compiler to be non-modifiable.
They are for code-organizational purposes.