im unable show the response of AT command in serial port.. getting response -1

#include "SoftwareSerial.h"
String ssid = "connectify-krish";
String password = "12345678";

String myword= "";
SoftwareSerial esp(10, 11);
void setup()
{
Serial.begin(9600);
esp.begin(9600);
esp.write("AT");

Serial.println(esp.read());

}

void loop()
{

}

If there's nothing there to read, Serial.read will return -1.
You must be patient - serial data will arrive eventually.
Or you could check there's something to read, before reading it.

You should also use code tags when posting code.

#include "SoftwareSerial.h"
String ssid = "connectify-krish";
String password = "12345678";

String myword= "";
SoftwareSerial esp(10, 11);
void setup()
{
Serial.begin(9600);
esp.begin(9600);
 esp.write("AT\n");

  if(esp.available()) // check if the esp is sending a message
{
while(esp.available())
 {
   // The esp has data so display its output to the serial window
   char c = esp.read(); // read the next character.
   Serial.write(c);
 }
}
 

}