-2
I no longer know what to do, I need help. I want to print out all customer registrations and saved in public static void clientes()
, but for the impression I created a public static void imp()
, and when I try to make the call there, it does not, appears in the variable clientes
:
"cannot find Symbol".
PF, help me, I need to deliver this by tomorrow.
public static void cliente() {
CadastroCliente cc = new CadastroCliente();
cc.nome = JOptionPane.showInputDialog("Insira o nome do cliente: ");
cc.CPF = JOptionPane.showInputDialog("Insira o CPF do cliente: ");
List<CadastroCliente> clientes = new ArrayList<>();
clientes.add(cc);
}
public static void imp() {
for (int i = 0; i < clientes.size(); i++) {
CadastroCliente obj = clientes.get(i);
JOptionPane.showMessageDialog(null, clientes.toString());
}