X1131: Set Contains - In Two Sets

Write a method that will return true if the parameter value is in both of the given sets. Try to use only one line of code in the method.

Your Answer:

x
 
1
public boolean twoSetsContain(
2
    Set<Integer> set1, Set<Integer> set2, int value)
3
{
4
    
5
}
6

Feedback

Your feedback will appear here when you check your answer.