I've this class:
public class MenuUpElement {
Class<?> classe;
String label;
int viewId;
public MenuUpElement(int viewId, String label, Class<?> classe) {
viewId = this.viewId;
classe = this.classe;
label = this.label;
}
}
Then I have a static class StaticClass with this declaration:
public static final MenuUpElement[] menuUpElements = new MenuUpElement[]{
new MenuUpElement(12, "Main", MainActivity.class)
, new MenuUpElement(13, "Second", SecondActivity.class)
};
If I loop through StaticClass.menuUpElements in another class, I found two elements (correct) but all null (wrong):
menuUpElements[0].classe = null
menuUpElements[0].viewId= 0
menuUpElements[0].label= null
menuUpElements[1].classe = null
menuUpElements[1].viewId= 0
menuUpElements[1].label= null
Why?