I'm wondering which is a more effective storage method in java. Would be better to save constants in a class or a resource? The constants will be searched later by my Search program which will go through the list of constants so as to recognize possible options. Also if there is a more efficient method of storing them please say so or if i doesn't matter where i store them.
1). A java class called Search is going to be inputted with two or more constants they will then either access a java class that will redirect them as needed.
2). Search will receive the same information but will look to a external resource to see what possible files match it then corresponding what info was give will open a pathway to the java class it correlated.
Which version should be better or will it not matter?
the values the constants contain are going to be ints but each int will have their own unique meaning.
To clarify why i need these arrays each number is going to have a meaning and the arraylists will hold the numbers like 1 may mean work 2 may mean private and so a private work document would have name PDocument has [1,2] so on and so on hope that clarifies
So which option is more effecient #1 or #2