Olá lista

Estou estudando para certificação e; podes , de forma didática, responder-me esta questão? Portuguese please ;)

Here is a method that creates a number of String objects

in the course of printing a countdown sequence:

1. public void countDown()

2. for( int i = 10 ; i >= 0 ; i-- ){

3. String tmp = Integer.toString( i );

4. System.out.println( tmp );

5. }

6. System.gc()

7. System.out.println( BOOM! );

8. }

When the program reaches line 7, how many of the

String objects created in line 3 will have been garbage

collected? Assume that the System.out object is not keeping

a reference.

RESPOSTA

a - nome

b - 11

c - 10

d - there is no way to tell



   ))    []s, Soares     http.vivavida!com
C|~~|
.`--'  http.macrosoft.tbm



Yahoo! Encontros
O lugar certo para você encontrar aquela pessoa que falta na sua vida. Cadastre-se hoje mesmo!

Responder a