Uma de collection

3 respostas
balrog
public class NewsTicker {

public static void main(String[] args) {

TreeSet ticker = new TreeSet();

ticker.add(new String(Football news story));

ticker.add(new String(Basketball news story));

System.out.println (ticker.first());

}

}

vai imprimir “Football news…” ou “Basketball news…” ?

3 Respostas

maxguzenski

eh pela ordem alfabética…
no caso Basket…

a TreeSet é um tipo de Map ordenado

smota

Basketball news story :?:

:roll: hummmm … acho que eh isso.

balrog

é isso mesmo !!

Criado 14 de julho de 2003
Ultima resposta 14 de jul. de 2003
Respostas 3
Participantes 3