When i connect to the internet using my router, the ipv4 address is x.y.z.a,where as,when i use sites like whatismyip to verify my ip,they show a different ip!..I know there must be some configuration issues with the router settings,But if i make somehow the ip address Static(which i see from those sites),Could it be possible to accomplish connections with other computers using that ip? What's the benifit of using static ip?

The majority of the time, your external IP address isn't going to be static unless you've paid extra to your Internet Service Provider.

Are you sure you aren't confusing your internal and external IPs?

I have developed a java program which has a server and a client program. The client program is needed to be run by my friend who is is a different city where as i would run the server program. This program works as long as i put the ip information as the internal ip address,in the client program.(inside the home network only) What i want is to have a single IP which can be used by the client program,anywhere over internet to run the client program.Without using servers isn't it possible? If no,then does free server providers like www.serversfree.com allow these facilities?

What you can do is create an account with a DNS provider that supports dynamic DNS. You would then have to run a client from within your network that can detect the current public IP address and it will update your DNS hostname. Then, for your program, you use the hostname not the IP so that you can always connect even if your IP changes.

Or contact your ISP and pay the extra few dollars per month for the static IP option.

You also have to configure your Internet router for port forwarding to allow the incoming packets into your network.

@JorgeM : Thanks Man! Using the port forwarding concept its solved now! Thanks again..You're a gem..":)"