Mind map
Ch 2: Language Fundamentals
Map content
Ch 2: Language Fundamentals
ENCODING SETS
- ASCII
- American Standard Code for Information Interchange
- Used in Java for input elements, except comments, identifiers, and the contents of characters and strings
- American Standard Code for Information Interchange
- Unicode
- Attempts to include all characters in all languages in the world into a single character set
- Java supports Unicode characters for comments, identifiers, characters and strings
- Character Encoding makes it easier and more efficient to store and transmit Unicode
- Attempts to include all characters in all languages in the world into a single character set
- ASCII
SEPARATORS
- Help define the structure of the program
- Parentheses ( )
- Method signatures, narrowing conversions, loops to contain expressions to be evaluated
- Braces { }
- Declaration of types, blocks of statements, array initialization
- Brackets [ ]
- Array declaration, array value dereferencing
- Angle Brackets < >
- Pass parameter to parametrized types
- Semicolon ;
- Terminate statements, in the 'for' statement to separate initialization code, expression, & the update code
- Colon :
- 'For' statement that iterates over an array or collection
- Period .
- Separate package names from subpackages & type names, separate field or method from reference variable
PRIMITIVES
- Simple non-object programming elements that represent numbers and simple values
- byte
- Byte-length integer (8 bits)
- short
- Short integer (16 bits)
- int
- Integer (32 bits)
- long
- Long integer (64 bits)
- float
- Single-precision floating point (32-bit IEEE 754)
- double
- Double-precision floating point (64-bit IEEE 754)
- char
- A unicode character
- boolean
- boolean value (T/F)
VARIABLES
- Data placeholders whose contents can change, must have:
- Declared data type
- Reference Types
- Provides reference to an object
- Primitive Types
- Holds a primitive
- Reference Types
- Name or Identifier
- Must begin with a Java letter
- Must not be a Java keyword, boolean literal or null literal
- Must be unique within its scope
- Declared data type
- Data placeholders whose contents can change, must have:
CONSTANTS
- Variables whose values, once assigned, cannot be changed
- Declared by using keyword 'final'
- Constant names are all in upper case with words separated by underscores
LITERALS
- Need to assign values to variables in a format that the Java compiler understands
- Literals of Primitive Types
- Integer Literals
- May be written in decimal, hexadecimal, or octal
- Used to assign values to variables of types byte, short, int, and long
- Floating-Point Literals
- Whole number part, decimal point, fractional part, optional exponent
- Used to assign values to variables of types float and double
- Character Literals
- Unicode character or an escape sequence enclosed in single quotes
- An escape sequence is a representation of a unicode character that cannot be entered using the keyboard or that has a special function in JAva
- Unicode character or an escape sequence enclosed in single quotes
- Boolean Literals
- Has 2 values; True or False
- Integer Literals
- String Literals
- Boolean Literals
Information
- Description
- Mind Map on Ch 2: Language Fundamentals, created by Samantha Sullivan on 25/09/2019.
- Created by
- Samantha Sullivan
- Views
- 3
- Rating