I am researching how to use the removeAll and addAll commands in Java, but i am struggling to find anything on the net on how to use these functions, so it would be much appreciated if someone could give me a little advice on how you should set out the code to something like as follows.
I have a range of values in treeSet1, beginning with a range of different letters(say R097483, J86583 and K95732), but in treeSet 2 I want the values out of treeSet1 that contains only the vaues with the first letter being 'R' at charAt[0].
Is this even possible, or am I just trying to to do something that isnt possible to do?
So far ive got to(but it will be way off probably as Ive never used this function before):
treeSet2.addAll(charAt[0]="R"(treeSet1));
Cheers for any help, its much appreciated.
I have a range of values in treeSet1, beginning with a range of different letters(say R097483, J86583 and K95732), but in treeSet 2 I want the values out of treeSet1 that contains only the vaues with the first letter being 'R' at charAt[0].
Is this even possible, or am I just trying to to do something that isnt possible to do?
So far ive got to(but it will be way off probably as Ive never used this function before):
treeSet2.addAll(charAt[0]="R"(treeSet1));
Cheers for any help, its much appreciated.
Last edited: