Dear Amrit,
Radars transmits radio waves are used to detect the objects like spacecraft, ships, missiles etc and they can be used in ship for same purpose. The sonar is an object which is used in ships and underwater submarines to detect the depth of the sea bed and to check the other obstacles, it is based on the echo produced by the reflection of sound waves. Sonars can be used in the helicopters in defence purpose to localise the objects.
Regards