You all misunderstand this. You focus on aspects that are almost irrelevant; and you do it, you wrote bad code) in both examples!
First of all, you are not using raw types .
Instead you go:
List<String> theWords = new ArrayList<>();
( : List . )
Java "" ,
List<String> theWords = Arrays.asList("me", "didn't", "know", "that", "but", "could", "have");
; for-each /:
for (String aWord : theWords)
ints ..
: Java C. ; ; . : " " - . : " " ( , " ", ), . JVM JIT ... , !
; " " ; JIT (, ).