O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

Week 2: Classes, interfaces and variable length parameters

Creshe Naidoo Computer Science Inglês

Conteúdo do mapa

Week 2: Classes, interfaces and variable length parameters

  1. Access modifiers

    • private
      • accessible wihin class only
    • proteced
      • accessible in package and sub-classes
        • sub-class might not be same package
        • same package should not access but may
    • public
      • accessible anywhere
      • inteface public by default
  2. Other modifiers (non-access)

    • static
      • may access field/method via class
      • does not require object instance
      • fields/methods shared by all instance of class
      • static inner class may be intantiated without outer class
    • final
      • may not be changed once initiaised
        • class cannot subclasses thus extended
        • field initialise once and cannot be changed
        • method can't be overidden
  3. Types of classes

    • Named/'normal'
      • instantiated
      • multiple instances
      • has fields
      • all methods implemented
      • can be extended/implemented
    • Abstract
      • cannot instantiate
      • used as base class for inheritance (used for polymorphism)
      • multiple instances
      • methods abstract or implemented
      • can be extended or implemented
      • large group, related data
    • Inner
      • may access outer class field & methods
      • cannot exist alone (unless static)
        • instantiated within outer class
      • multiple instances
      • all methods implemented
      • can be extended or implemented
      • only makes sense or is valid in the outer class
        • not reusable in another context
    • static inner
      • same as named class
      • use when wanting a nested relationship but still accessible outside
    • Anonymous
      • defined inline
        • no name
      • class declared and instantiated at same time
      • cannot have multiple instances
      • cannot be extended or implemented
      • use: small object to implement. extension not important

Informações

Descrição
Computer Science Mapa Mental sobre Week 2: Classes, interfaces and variable length parameters, criado por Creshe Naidoo em 02-07-2018.
Criado por
Creshe Naidoo
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?