Its up to you, but once again I encourage you to use a Set or Map. This is their purpose. A short demo:
public class Test{
/**
*Analyzes the speed of list versus set searches
*/...
Type: Posts; User: copeg
Its up to you, but once again I encourage you to use a Set or Map. This is their purpose. A short demo:
public class Test{
/**
*Analyzes the speed of list versus set searches
*/...
If all you need is to look for the presence of a String in an array, I'd highly recommend using a Set or Map instead of a List. The lookup is MUCH faster than iterating over an array in a nested...