Jump to content

Recommended Posts

Posted

Alguém me pode ajudar com este erro!!!

Obrigado

Exception in thread "main" java.lang.NullPointerException

at uatla.sgb.domain.GestaoBanco.menuClientes(GestaoBanco.java:94)

at uatla.sgb.domain.GestaoBanco.apresentaMenu(GestaoBanco.java:48)

at uatla.sgb.domain.GestaoBanco.main(GestaoBanco.java:24)

Posted

Exception in thread "main" java.lang.NullPointerException

at uatla.sgb.domain.GestaoBanco.menuClientes(GestaoBanco.java:94)

at uatla.sgb.domain.GestaoBanco.apresentaMenu(GestaoBanco.java:48)

at uatla.sgb.domain.GestaoBanco.main(GestaoBanco.java:24)

gostava mais de ver a linha numero 94

IRC : sim, é algo que ainda existe >> #p@p
Posted

Esta é a linha 94...

oCliente.getContaordem().adicionaCartao();

clicando no cliente da isto:

private static void menuClientes(Banco oBanco) throws IOException{

int oClienteID, oCartaoID, aContaID;

int opcao = -1;

ClienteNormal oCliente;

CartaoDebito oCartao;

ContaBase aConta;

Clicando na getContaOrdem:

public ContaOrdem getContaordem() {

return contaordem;

}

e clicando na adicionacartao

public void adicionaCartao() throws NumberFormatException, IOException{

CartaoDebito novoCartao = null;

double oPlafond;

int opcao = -1;

Posted (edited)
oCliente.getContaordem().adicionaCartao();

ou a variável oCliente não está instanciada ou a função getContaordem() não está a retornar o objecto (por outras palavras : contaordem não está instanciada)

Edited by HappyHippyHippo
IRC : sim, é algo que ainda existe >> #p@p

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.