Hi I am writing an application java , is any way to write a java code to convert rupee to u.s. dollar and it shoud fetch the current u.s. dollar. I need the program in java
Thanks
Hi I am writing an application java , is any way to write a java code to convert rupee to u.s. dollar and it shoud fetch the current u.s. dollar. I need the program in java
Thanks
Google is our friend. I found this webservice which offers currency conhttp://www.webservicex.net/WS/WSDetails.aspx?WSID=10
You'll either hardcode the exchange rate in your application or database, or you'll be fetching that in real time (or asynchronously & cache every x minutes) from a third party site, for example http://www.google.com/search?q=1+usd+in+inr
In order to do this you would need to fetch the current exchange rate from a web service. The easiest way, if you just need to fetch a page, is something like this:
InputStream is = new URL("http://someexchangesite.com...").openStream();
Then read and parse the InputStream to find the exchange rate, and then use it with some simple multiplication!