Mind map
The Language of Programming
Map content
The Language of Programming
Characters
- There are many different character sets, all of varying sizes and suited for the needs of users in different regions
- ASCII
- Consists of 128 characters, each represented by 7 bits
- Extended version of ASCII contains 256 characters, each represented by 8 bits
- Java uses ASCII for most inputs
- 8 bits = 1 byte. Storing and transmittng 8 bits is most efficient
- Unicode
- Attempts to include all characters in 1 set
- There are various Unicode character encodings, so developers can use the one that they need
- Java supports Unicode for comments, identifiers, and strings
Separators
- () Parentheses
- Indicate operator precedence in expressions
- Contain arguments in method signature
- Used in narrowing conversions
- Used in loops to contain expressions to be evaluated
- {} Braces
- Used in declaration of types
- Used in blocks of statements
- Used to initialize arrays
- [] are used in array initialization and array value dereferenceing
- <> pass parameter to parametrized typed
- ; terminates staments and separates parts of for statements
- : is used in for statements that iterate over arrays or collections
- , separates arguments in method declarations
- . separates package names from subpackages and field or method from reference variable
- () Parentheses
Primitives
- Primitives are data types
- Numbers
- 6 primitive data types represent numbers: byte, short, int, long, float, double
- byte, short, int, and long all represent integers. Bytes as smallest, shorts are next smallest. Longs are largest
- Numbers assigned to Long must have a suffix of "L"
- Can all also be expressed in binary with "0B" prefix
- You can use _ to separate digits in an integer literal
- Float and double represent decimals. A double takes more space
- Floating-point literals have a whole number part, a decimal point, a fraction part, and an optional exponent
- char
- A single Unicode character
- Some character literals are escape sequences, used to express quotes, tabs, Unicode characters, etc.
- A single Unicode character
- boolean
- true or false
Variables
- Variables are data placeholders
- Each variable must have a declared type.
- Reference types: variable points to an objects
- Primitive types: variable holds a primitive
- Variables have a name (identifier)
- It must begin with a java letter and cannot be a Java keyword, boolean, or null
- A Java letter is any capital or lowercase letter, or $
- It must begin with a java letter and cannot be a Java keyword, boolean, or null
Information
- Description
- Mind Map on The Language of Programming, created by Jeff Golub on 28/09/2019.
- Created by
- Jeff Golub
- Views
- 1
- Rating