initialise set that holds value of array
Hello,
Can you please tell me how to initialise a sorted set that holds the values of an array of class static variable.
I have an array - public static int[ ] InDays {4, 5, 9, 12, 15, 16, 20, 23, 28, 30};
and I need to assign it to SortedSet<Integer> InDaysAtWork
Many thanks
Re: initialise set that holds value of array
Code Java:
public static final int InDays [] = { 4, 5, 9, 12, 15, 16, 20, 23, 28, 30 };
//create SortedSet
SortedSet< "Insert Type Here" > InDaysAtWork = new SortedSet< "Insert Type Here" >( Arrays.asList( InDays ) );
...you'll have to figure out the type to insert and remove the quotation marks.
That's all I'm giving you :)