Wednesday, 17 May 2017

Is there an "in" Python keyword equivalent in Java?

What is the most simple/efficient way of implementing the following Python code in Java?



if "foo" in ["foo", "bar"]:
print "found."

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...