Serial1 not working[SOLVED]

I am using the Arduino Mega 2560 and Serial1 is not working, does anybody know what is the problem?

Edit: The problem lies with the IDE, one i re downloaded the IDE, everything works like wonders.

I think you're going to need to provide more information. What sketch are you running? What is it connected to? Are the grounds connected? In what way is it 'not working'?

I tried connecting the Adafruit Serial TTL camera to Serial2 and Serial3 and it is working perfectly fine, but when i tried to connect it to Serial1, it does not detect the camera. I also tried to send data to Serial1 and print it on the Serial Monitor but it is not working as well. It doesn't seems to be the board problem as i have tried it with other Arduino board as well.