Mind map
Language Fundamentals
Map content
Language Fundamentals
Encoding Sets
- --(American Standard Code for Information Interchange) --> represent 128 alphanumeric characters, includes the lower case and upper case Latin letters, numbers, and punctuation marks -- extended ASCII --> includes another 128 characters
- ISO((International Standards Organization)-8859-1/ Latin-1 = Each character in ISO-8859-1 is represented by 8 bits as well.
- Unicode = attempts to include all characters in all languages in the world into one single character set
- a Unicode character was represented by 16 bits, which were enough to represent more than 65,000 different characters
- Unicode text is not as efficient as storing and transmitting ASCII or Latin-1 characters
- character encoding can make it more efficient to store and transmit Unicode text
- character encoding = data compression
- UTF-8, UTF-16, UTF-32
- character encoding = data compression
- a Unicode character was represented by 16 bits, which were enough to represent more than 65,000 different characters
Primitives = data types
- There are eight primitive types in Java, each with a specific format and size
- --byte, short, int, and long can only hold integers or whole numbers float or a double. float or a double. --float or double are for numbers with decimals
- --char type can contain a single Unicode character, such as ‘a’, ‘9’, and ‘&’. Unicode allows chars to also contain characters that do not exist in the English alphabet. -- boolean can contain one of two possible states (false or true).
- Note: Use long only when needed because it consumes more memory
- There are eight primitive types in Java, each with a specific format and size
Variables = data placeholders
- Java is a strongly typed language, therefore every variable must have a declared type. There are two data types in Java
- 1.reference types. A variable of reference type provides a reference to an object.
- 2.primitive types. A variable of primitive type holds a primitive.
- a Java variable also has a name or an identifier and rules for choosing
- 1. unlimited-length sequence of Java letters and Java digits. must begin with a Java letter. 2. not be a Java keyword, a boolean literal, or the null literal. 3. unique within its scope. ”
- declare a variable = by writing the type first, followed by the name + a semicolon
- Java is a strongly typed language, therefore every variable must have a declared type. There are two data types in Java
Constants = variables whose values, once assigned, cannot be changed
- declare a constant = by using the keyword final
- constant names are all in upper case with words separated by underscores.
- declare a constant = by using the keyword final
Literals
- Use: When you need to assign values to variables in your program, such as number 2 to an int. You'll need to write the value representation in a format that the Java compiler understands. This source code representation of a value is called literal
- three types of literals: literals of primitive types, string literals, and the null literal
- Focus --> primitive types = have four subtypes: integer literals, floating-point literals, character literals, and boolean literals.
- Integer
- may be written in decimal (base 10), hexadecimal (base 16), or octal (base 8).
- used to assign values to variables of types byte, short, int, and long. Note --> however, you must not assign a value that exceeds the capacity of a variable
- To assign a value to a long, suffix the number with the letter L or l
- used to assign values to variables of types byte, short, int, and long. Note --> however, you must not assign a value that exceeds the capacity of a variable
- may be written in decimal (base 10), hexadecimal (base 16), or octal (base 8).
- Floating-point
- 4 parts: --a whole number part --a decimal point --a fractional part -- an optional exponent
- 2 types: -- float: 32 bits in size. -- double. 64 bits in size.
- For both: whole number part of 0 is optional
- Character
- Unicode character or an escape sequence enclosed in single quotes
- escape sequence is the 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
- boolean type has two values, represented by literals true and false
- Integer
- Focus --> primitive types = have four subtypes: integer literals, floating-point literals, character literals, and boolean literals.
Separators
Images and files in the map
Information
- Description
- Mind Map on Language Fundamentals, created by D'Amour Edwards on 16/06/2020.
- Created by
- D'Amour Edwards
- Views
- 0
- Rating