Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の Python コードを Java で実装する最も簡単で効率的な方法は何ですか?
if "foo" in ["foo", "bar"]: print "found."
配列にデータがある場合は、これを使用してください
String[] strings = {"foo","bar"}; for (String s : strings) { if (s.equals("foo")) { System.out.println("found"); break; } }