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

Mind map

Literals

Abdelkrim ZAHMOUNI English

Map content

Literals

  1. Literal Values

    • Integer Literals
    • Decimal Literals
    • Octal Literals: 06
    • Hexadecimal Literals: 0xFFFFl
    • Floating-Point Literals: 11301874.9881024
    • Boolean Literals: true, false
    • Character Literals: 'a', '\u004E'
    • String Literals: "Word"
  2. Strings: Immutable Objects

    • special area of memory called the "String constant pool."
      • Existing Strings simply have additional references,
      • The reason why String is immutable and marked final is to not cause problems in the pool
    • String s = new String("abc"); // creates two objects, and one reference variable
    • StringBuffer and StringBuilder
      • Exactly the same API except StringBuilder is not thread safe: its methods are not synchronized: StringBuilder will run faster
      • StringBuilder append(String s)
      • StringBuilder insert(int offset, String s)
      • StringBuilder delete(int start, int end)
      • StringBuilder reverse()
      • String toString()
    • chained methods: x.concat("def").toUpperCase().replace('C','x')
    • String API
      • char charAt(int index)
      • String concat(String str)
      • int length()
      • boolean isEmpty()
      • String replace(char oldChar, char newChar)
      • String substring(int beginIndex[, int endIndex])
      • String trim()
      • String to(Lower|Upper)Case()
      • boolean equalsIgnoreCase(String anotherString)

Information

Description
Mind Map on Literals, created by Abdelkrim ZAHMOUNI on 04/10/2018.
Views
0
History
  • Created by Abdelkrim ZAHMOUNI · Sep 23, 2018
  • Copied by Abdelkrim ZAHMOUNI · Oct 3, 2018
  • Copied by Abdelkrim ZAHMOUNI · Oct 3, 2018
  • Copied by Abdelkrim ZAHMOUNI · Oct 3, 2018
  • Copied by Abdelkrim ZAHMOUNI · Oct 4, 2018
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?