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

Mind map

Pages 25-39

Gary Jones English

Map content

Pages 25-39

  1. character encoding increases efficiency of storing and transmitting unicode text

    • character encoding = data compression
    • Unicode Consortium endorses three types of character encoding systems
      • UTF-8
        • used when unicode is transformed to variable lengths of bytes
      • UTF-16
        • all commonly used characters fit into a single 16-bit code unit
      • UTF-32
        • uses 32 bits for every single character. Much data, not used for internet applications
    • Unicode
  2. Java uses ASC2 for almost all input elements except comments, identifiers, and the insides of strings/characters

  3. Separators

    • (); {}; []; <>; ; ;:,;.
  4. Primitives

    • byte; short; int; long; float; double; char; boolean
    • bytes contains a whole number b/t -128 and 127
      • a byte is 8 bits so 256 possible values.
    • An int can store up to # 1000000
    • Use different values for storage purposes. byte uses the least amount of memor. int uses more and long even more
  5. Variables

    • variables are data placeholders
      • 2 types: reference types and primitive types
        • reference types points toward an object
        • primitive types hold a primitive
    • identifiers are an unlimited length sequence of java letters/numbers
      • must begin with a Java letter. Must not be a Java keyword/boolean/or null literal. It must be unique
  6. Java Letters and Digits

    • Include uppercase and lowercase ASCII Latin letters
    • Declare a variable by writing the type first then the name plus a semicolon
    • Can declare multiple variables on same line: int a, b;
    • Variable names should be short and meaningful. Lowercase first then Uppercase: dogCat
  7. Constants

    • use final to assign a value to a variable which you don't want changed
  8. Literals

    • literal = source code representation of a value
      • 3 types: primitive types, string literals, null literal
        • 4 types of primitive literals: integer literals, floating point literals, character literals, boolean literals
          • Integer Literals
            • decimal = base 10; hexadecimal = base 16; octal = base 8
            • used to assign values to bytes, short, int, and long
              • When assigning a value to long be sure to use L after the number: long a = 0900L. otherwise it registers as an int
          • Floating-Point Literals
            • Floating-Point: a whole number part. a decimal point. A fractional part. An optional exponent
              • Float or Double. Float = 32 bits. Double = 64 bits
          • Boolean Literals
            • Two literals = true and false
          • Character Literal
            • enclosed in single quotes
            • escape characters: "\n"
  9. Primitive Conversions

    • identity conversion: conversion from a type to the same type
      • Always succesful
    • Widening conversion and narrowing conversion: conversion from a type to another type
      • Not always sucessful
      • Widening Conversion
        • converts from small type to an equal size type or a larger type: int to long
          • No information loss
      • Narrowing Conversion
        • converts from a large type to a smaller type: long to int
          • need to specify the target type in parentheses: long a = 10; int b = (int) a;
          • may incur information loss
  10. Operators

    • performs an operation on 1, 2 or 3 operands: x + 4. The + is the operator
    • Operators that require only 1 operand are unary operator
      • binary = 2 operands
    • six categories: unary operators, arithmetic operators, relational and conditional operators, shift and logical operators, assignment operators, and other operators

Information

Description
Mind Map on Pages 25-39, created by Gary Jones on 30/05/2019.
Created by
Gary Jones
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?