GoConqr has a new look! Let us know what you think.

Mind map

Language Fundamentals

Julianna Pettey English

Map content

Language Fundamentals

  1. Encoding Sets

    • Unicode is a character set that represents more than 65,000 characters and used by many programming languages
      • Problem: so much data to transfer --> encoding allows us to use Unicode when writing comments, identifiers, characters, and strings. UTF-8 is the most popular
    • ASCII (American Standard Code for Information Interchange) character set is the standard character set and represents 128 characters
  2. Primitives

    • 8 different data types that are used to represent numbers, characters, and specific phrases
      • byte, short, int, long, float, and double all represent integers or decimals
      • char contains a single character like 'd', '&' ,or '4'
      • boolean returns either true or false
  3. Variables

    • Variables represent data and must have a declared type
      • Reference types refer to objects and primitive type
    • Variables also have a name (can't be a Java keyword, boolean, or null)
    • Declare a variable by writing the type followed by the name and a semicolon
      • int rowCount; or char c;
      • Can combine variables with the same type by separating with a comma
        • int a, b; = int a; int b;
        • Possible to assign value at the same time as you declare a variable
          • int rowCount = 100;
  4. Constants

    • Constants are variables that have values that can't be changed
      • Declare a constant using keyword 'final'
        • Constants are all uppercase with words separated by underscores
          • final int ROW_COUNT = 50;
  5. Literals

    • Integer Literals
      • Assign values to primitives: byte, short, int, and long
        • Can't assign value to a literal when it's outside the allowed values
          • byte b = 200; doesn't work because byte can go from -128 to 127
      • Written in decimal(base 10), base 16, or base 8
      • 2 or int x = 2;
        • 1_000_000
    • Floating-point Literals
      • 0.2, .2, 7.33, 0.7 e^12
      • Consists of: whole number part, decimal part, fractional part, optional exponent
      • Two types: Float = 32 bits // Double = 64 bits
        • use f or F to create a float, if not, automatically becomes a double
          • 8.f or 0.5f // 12.53
    • Character Literals
      • A single character enclosed in single quotes
        • 'a' // '%' // 'R'
      • Escape sequenses can't be entered using the keyboard but can be represented with a character literal
        • '\b' = backspace character // '\t' = tab character // '\\' = backslash
    • Boolean Literals
      • Returns two values: true and false

Information

Description
Mind Map on Language Fundamentals, created by Julianna Pettey on 27/09/2020.
Created by
Julianna Pettey
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?