v2

+   String type = textLine.substring(0,4);
+   System.out.println(type);
+   if(type.compareTo("spam")==0){