ArrayList

Eu to tentando retorna um valor na posição 0, mas da “incompatible types”

    ArrayList destino = new ArrayList();

    public int getDestino()
{	
	return destino.get(0);
}

o q pode estar errado?

o get de ArrayList retorna um objeto e naum o tipo primitivo int

tenta

	ArrayList destino = new ArrayList();

	public Integer getDestino() {
		return (Integer) destino.get(0);
	}

ou para java 5

[code]
ArrayList destino = new ArrayList();

public Integer getDestino() {
	return destino.get(0);
}

[/code][/code]

vlw kra, obrigadão! :grin: