Problem with nested for loops and servos

You need to open the Serial connection at the start of your program with :

Serial.begin(9600);

Full Program

void setup() 
{
 Serial.begin(9600);

 Serial.println("In setup");
}

void loop() 
{
  Serial.println("In loop");

  delay(2000);
}

You can then view the output in the Serial Monitor in the Arduino IDE (>Tools > Serial Monitor). 9600 is the baud rate and needs to match what is set in your monitor.