4
I am learning Java and came across the need of the operator in
. For example:
I have a vector (v = {1,2,3,4,6}
) and I want to see if 5 is in this vector (there is in this case).
In python would be v = [1,2,3,4,6]
- 6 in v
, then he would return False
. I want to do this in Java, but don’t find the operator that works.
How do I do this in java?
Need to scan with a loop each input.
– user28595