I have an object in java that encodes something as such:
public class Obj(){
private string[] array = {
"1","2","3","4",etc...
};
public Obj(String param){
if (param=this.array[1]){ do something.. }
}
}
So I need to have so info in the background. However, apparently it takes up a lot of RAM. So I was wondering if there is a way to just have the array once for all of those objects instead of having it in every single object.
EDIT:
Made it static. Does the magic. Thank you guys.
Thank you