blob: de1d6a4fe097a0ea27be487cbd43b05e51b7d6e3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import java.util.ArrayList;
class CapitalC {
public static void main (String str[]) {
ArrayList<String> book = new ArrayList<>();
//book titles
book.add("test");
book.add("Capital");
book.add("test2");
book.add("Carmex");
book.add("LaTeXC");
book.add("C++");
book.add("East");
for (String b: book){
if(b.charAt(0) == 'C'){
System.out.println(b);
}
}}}
//By msglm; Licensed under the AGPL v3
|