Thanks MrSnowflake for the information.
As I get it, this behavior is exhibited in debugging only.
If I get a real device I'd have to use the USB cable to upload my program. Then without relying on the cable, if I directly use my wi-fi network to communicate between my PC and the device, things would be normal. The PC application will be able to directly connect with the Android device IP (assigned by Wi-Fi network).
If I rely on debugging mechanisms (emulator or USB cable), I wouldn't be able to truly get the feeling of Wi-Fi networking. Isn't it? Please correct me if I'm wrong since I have to truly make sure of this before buying one in vain.
Thanks for the help.