I have to implement some classes with functions. These functions have to return some errors codes, I usually use to declare a public enum with the errors codes and that work for me (for example in c#) but I had read that enums are not so good in Android (performance), so what do you think about this code?
public class myClass_1
{
public final class myErrorCodes
{
public static final int ERROR_1 = 0x01;
public static final int ERROR_2 = 0x02;
public static final int ERROR_3 = 0x03;
public static final int ERROR_4 = 0x04;
public static final int ERROR_5 = 0x05;
public static final int ERROR_6 = 0x06;
}
public int Function_1(int a,int b)
{
// do something here...
return myErrorCodes.ERROR_1;
}
}