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

Flashcards

Programming Idioms

jlab Informatik Alemão 5 flashcards

Flashcards do conjunto (5)

  1. 13 Advantages of "Immutable Objects"- inherently thread-safe
    - simpler to understand and reason about
    - safer
  2. 2Definition of "Immutable object"Objects that cannot change their state after creation.
    Sometimes the internal state can change.
  3. 3Common error in reasoning why "immutable objects" are avoided. Two reasons why this is not good reasoning.Programmers worry about the cost of creating a new object instead of updating one.
    Reason 1: Often, cost of garbage collection is decreased
    Reason 2: Code that protects mutable objects from corruption can be avoided
  4. 44 Characteristics of an immutable Java object.- no setters
    - all fields private and final
    -don't allow sublclasses to override methods (by declaring the class final or using factory methods)
    - don't store references to mutable objects
  5. 5Purpose of "defense copying"To avoid that the internal state of an object (often an object that is considered immutable) is changed by the manipulation of a contained object through a reference outside the object.

Informações

Descrição
Informatik FlashCards sobre Programming Idioms, criado por jlab em 31-08-2014.
Criado por
jlab
Visualizações
18
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?