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

Flashcards

Static Variables

BLU BLU Alemão 6 flashcards

Flashcards do conjunto (6)

  1. 1How does a static variable works ?- Once declared, a single copy of the variable is created and shared amongst all objects
    - essentially, global variables
    - Can be accessed using class reference
  2. 2Where is the reference variable placed memory wise?In Stack memory
  3. 3Where is the object saved memory wise?In Heap Memory
  4. 4Where is the static variable been saved and when does it loads?Static variable belongs to the class. Gets loaded in the class area when the class loads
  5. 5Static Methods- Belongs to the class rather than an object of a class
    - Direct access using the class name
    - Can access static data members only and can change their values
  6. 6Static Blocks- Used to initialize static variables
    - Gets executed exactly once, wehen the class is first loaded, thus they are executed before main method
    - Can access static data members and can change their values

Informações

Descrição
FlashCards sobre Static Variables, criado por BLU BLU em 23-01-2025.
Criado por
BLU BLU
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?