Java
Java is a general-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. It is intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.
I'm currently trying to broaden my horizons by learning more back end oriented programming languages, with Java being the first step.
Java is a statically typed language, meaning the type of a variable has to be specified by the developer.
This results in a variable's type being known at compile time (as opposed to at run-time).
This is done as follows:
int gear = 1;
This means that a variable called gear exists, is of type integer (a whole number, as seen below), and holds an initial value of 1.
There are eight primitive data types in Java.
- 8-bit signed integer
- Can have values between -128 through 127 (inclusive)
- Can be used for saving memory in large arrays
- 16-bit signed integer
- Can have values between -32,768 through 32,767 (inclusive)
- Can be used for saving memory in large arrays
- 32-bit signed integer
- Can have values between −2,147,483,648 through +2,147,483,647
- 32-bit signed integer
- Can have values between −9,223,372,036,854,775,808 through 9,223,372,036,854,775,807
- single-precision floating point number
work in progress...
Last modified 3yr ago