[RESOLVIDO] Converter String para Int

3 respostas
doougllas
for (Clientes clientes : list) {
            
            String data = clientes.getDataVencimento();
            String dia = mostra_data.dia;
            String ultimo_pgto = clientes.getUltimoMes();
            
            if (data >= dia){
                if (ultimo_pgto == mostra_data.mes){
                    tabela_clientes.show();
                }
            }
        }
A parte..
if (data >= dia) {
Eu já tentei fazer isso :
if ( (Integer) data >= (Integer) dia) {

Mais não deu certo, alguém sabe como posso fazer ?

3 Respostas

L

Integer integer = new Integer(“1”);

Tipo converte antes e depois compara.

Cerjr

Você pode fazer assim tb.

if ( Integer.parseInt(data) >= Integer.parseInt(dia)) {
doougllas

RESOLVIDO!

Consegui aqui, valeu pela ajuda!

Criado 8 de janeiro de 2010
Ultima resposta 8 de jan. de 2010
Respostas 3
Participantes 3