Mapa mental
Programming Concepts
Conteúdo do mapa
Programming Concepts
Unicode
- used in Java - contains all character in all languages
Separators
- ( ) used for arguments, operator precedence, narrowing conversation, loops
- { } used for declarations, blocks of statement, array initialization
- [ ] used for array declaration and value dereferencing
- ; used to terminate statements
- : used in 'for' statements for an array or collection
- , used to separate arguments in method declaation
- . used to separate packages and subpackages and fields/methods from variable
- < > used to pass parameter to parameterized types
Primitives (a data type)
- byte, short, int, long, float, double, char, boolean
- not as 'expensive' as objects
Variables
- Reference types references an object
- Primitive type holds a primitive
- Name must begin with a letter, not be a keyword, and be unique
- See page 33 for list of keywords
- Declare a variable by putting the type then the name. Ex: int count;
- Assigning a value: int count = 0;
- Constants = variables whose values can't be changed
- use keyword 'final' in front of variable type. Ex: final int COUNT = 0;
- all UPPERCASE names separated by underscore
Literals = source code representation of a value
- only primitive types discussed here
- Integer Literals
- can be written as base 10, base 16 or base 8 decimals
- Base16: begin with 0x or 0X
- Base 8: begin with 0
- Base16: begin with 0x or 0X
- Only used for byte, short, int, long
- for type 'long', end the value with an 'L'
- Can separate numbers for readability with underscores
- Ex: 1000000 or 1_000_000
- can be written as base 10, base 16 or base 8 decimals
- Floating-Point Literals
- Contain: a whole number, a decimal point, a fraction part, and an optional exponent
- f or F after the value indicates a float
- d , D or writing nothing indicates a double
- f or F after the value indicates a float
- Contain: a whole number, a decimal point, a fraction part, and an optional exponent
- Character Literals
- A unicode character or escape sequence enclosed in single quotes
- Ex: 'a', 'C', '\t'
- A unicode character or escape sequence enclosed in single quotes
- Boolean Literals
- Can be true or false
Informações
- Descrição
- Mapa Mental sobre Programming Concepts, criado por Rachel Johnson em 19-06-2020.
- Criado por
- Rachel Johnson
- Visualizações
- 0
- Avaliação