Class 2: Data Types

One of the most important aspects of programming languages is types. Since Java is a statically typed language, that is to say that types must be declared before being used.

Today,I’ll let most of my code do the talking, but just know that there are 8 primitive (basic) data types

  1. byte
  2. short
  3. int
  4. long
  5. char
  6. boolean
  7. float
  8. double

From these primitive types, all other objects are formed, such as strings. There is also the final data type which is a way of creating a constant value-i.e it can’t be changed once it has been declared. these are typically signaled as UPPERCASE letters as a matter of convention.

Sorry for the short post, but the code should be able to elaborate much further.

JTypes: An illustration of Java’s Data Types. Example | Code

Advertisements