I would like to know whether what i have done is the best way to implement:
I have a method that takes a Date value and a String value as parameters. I have a set of dates and the string value pairs. I have stored it in a multidimentional array, and while passing to method, i have converted the String to Date. Here is my code:
Can you please tell me if there is a better way to implement this? Is there any other Collection that i can use?
I would change from using a multi-dimensional array to using an array of Parameter objects, which have a date and String property (though it might be a Date andInteger, since the String value looks like its going to be a number)). This saves you the headache of managing a multi-dimensional array, means you don't have to worry about the date format and stops someone changing string values in your array causing the application to crash.