String s; while((s = br.readLine()) != null) { components = s.split(" "); if (components.length > 2) { if (components[0].startsWith("v")) { } if (components[0].startsWith("f")) { for (int i = 1; i <= 3; i++) { for (int j = 0; j < 3; j++) { } } } } }