You need to sign in to do that
Don't have an account?
chaitanyakuamar Teru
Q.Print and count the unique values from firstColorList, secondColorList along with the exact count. (red-2,blue-3,yellow-1,black-1,green-1) and ovral count 6
list<String> firstcolourlist=new list<String>{'red','blue','yellow','orange'};
list<String>secondcolourlist=new list<String{'blue','black','yellow','green','blue'};
apex list compare
Q.Print and count the unique values from firstColorList, secondColorList along with the exact count. (red-2,blue-3,yellow-1,black-1,green-1) and ovral count 6
list<String> firstcolourlist=new list<String>{'red','blue','yellow','orange'};
list<String>secondcolourlist=new list<String{'blue','black','yellow','green','blue'};
I tried this below sample code and it worked for me can you try checking and modify it as per your scenario:
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
#thanks for your respons.
along with that, I need the total count of all values from list1&list2 count = ' ';
list 1 = a,b,c,d
list2 = c,a,d,e
total count = 8;
can you help me pls