I have the doubt on how to generate auto-generate chain codes with a counter
that is:
e001 e002 e003 e004 ...
the following code is generating e000 e000 e000 e000
If someone could help me, it would be great, thanks
public class alumnoMemory implements ICrudService<alumno>
{
List<alumno> alumnos = new ArrayList<>();
static int cont;
static String conte;
static
{
cont = 0;
conte="e00" + cont;
}
@Override
public void create(alumno obj) {
cont++;
obj.setId(conte);
alumnos.add(obj);
}
}