Mapa mental
XSPELSODE
Conteúdo do mapa
XSPELSODE
Garbage Collection
- under the control of the JVM; decides when to run it
- System.gc() ask the JVM to run the GC but no guarantees
- Make Objects Eligible for GC
- Nulling a Reference
- Reassigning a Reference Variable
- Isolating a Reference
- only thing guaranteed GC will run before it throws an OutOfMemoryException
- new Objcect.finalize() called only once to clean up resources before GC
- might run, but you can't count on it; don't override finalize() at all
- we can save an object from deletion inside it by making a reference to that object
- If the object becomes eligible for GC later it will not run again
Loops and Iterators
- while, do while, for
- for(Declaration and initialization of same type, boolean expression, iteration expression)
- declaration has loop scope not method
- evaluating iteration expression then the conditional expression then enter block
- all three sections are independent of each other: don't need to operate on the same variables
- for (int a = 1; b != 1; System.out.println("iterate"))
- for( ; ; ) endless loop
- for(Declaration and initialization of same type, boolean expression, iteration expression)
- The Enhanced for (Arrays & Collections) for(item declaration: array)
- Early Loop Termination: break, return, System.exit()
- continue must be inside a loop otherwise compile time error
- break must be inside a loop or swith statement otherwise compile time error
- Labeled Statements
- Labeled continue and break statements must be inside the loop that has the same label name, otherwise compile-time error
- break outer; (by default break inner)
- while, do while, for
Informações
- Descrição
- Mapa Mental sobre XSPELSODE, criado por Abdelkrim ZAHMOUNI em 04-10-2018.
- Criado por
- Abdelkrim ZAHMOUNI · out 2018
- Atualizado
- 4 out 2018
- Visualizações
- 0
- Histórico
-
- Criado por Abdelkrim ZAHMOUNI · 23 set 2018
- Copiado por Abdelkrim ZAHMOUNI · 3 out 2018
- Copiado por Abdelkrim ZAHMOUNI · 3 out 2018
- Copiado por Abdelkrim ZAHMOUNI · 3 out 2018
- Copiado por Abdelkrim ZAHMOUNI · 3 out 2018
- Copiado por Abdelkrim ZAHMOUNI · 4 out 2018
- Avaliação