Arduino Power supply

Hey guys,
Is it safe to plug both USB cable and and External 12V power supply at the same time into the arduino and if yes which one has the priority and is it possible to establish a serial communication with the computer when both cables are pluged in ??

Which Arduino board ?

The Arduino boards, like the Arduino Uno can switch between power inputs while running. You can plug the usb and the 12V power just as you like. The 12V power has the priority.

The schematics are online, so you can always check for yourself how it is done.

Yeah i forgot to mention it's an arduino UNO .
And can i establish a serial communication using the USB cable while the external power supply is plugged in ?

Sure, why wouldn't you?