There are two simple ways:
1. Use an enhanced for loop. This is probably the simpler of the two, but in my opinion limits what you can do concerning the main vector you're dealing with.
for(Student s : students)
{
// do stuff with s
System.out.println("Student's name: " + s.getName());
}
The above code can be read as "for each Student s in students, ... (stuff inside the for-each block)
2. The second method is to use a standard for-loop (or a while loop) with a loop counter
for (int i = 0; i < students.size(); i++)
{
System.out.println("Student " + i + "'s name: " + students.get(i));
}
As you can see, there are certain things you can do using a loop counter since you do have more information. However, you will need to keep track of the loop counter yourself (not a big deal if it's something simple like this, but can get hairy as you nest multiple loops)