まさか、こんなコード書いてないよね?

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
String items[] = {"いんく", "すみ", "ありす"};
boolean hasItem = false;
for (String s : items){
	if("すみ".equals(s)){
		hasItem = true;
		break;
	}
}
if (hasItem){
	System.out.println("まじかるちぇんじ!");
}

```<a href="http://docs.oracle.com/javase/jp/6/api/java/util/Collection.html#contains(java.lang.Object)">Collection.contains(Object o)</a>を利用します
```java
String items[] = {"いんく", "すみ", "ありす"};
if (Arrays.asList(items).contains("すみ")){
	System.out.println("まじかるちぇんじ!");
}

```こっちのほうが見やすい