Java console app that fetches real-time exchange rates from the OpenExchangeRates API and converts between multiple currencies interactively.
- Run the application
- Choose the currencies you want to convert between
- Enter the amount
- Get the converted value using live exchange rates
- Java 8+
- OpenExchangeRates API key (free tier works) — get one at openexchangerates.org
- Internet connection
# 1. Clone the repository
git clone https://github.com/Ccirhack/currency-converter-java
cd currency-converter-java
# 2. Add your API key in src/main/java/.../OpenExchangeRateApi.java
private static final String API_KEY = "YOUR_API_KEY_HERE";
# 3. Compile and run
javac Main.java
java Main| Code | Currency |
|---|---|
| USD | US Dollar |
| EUR | Euro |
| PEN | Peruvian Sol |
| BRL | Brazilian Real |
| ARS | Argentine Peso |
| COP | Colombian Peso |
- Making HTTP requests with Java HttpClient
- Parsing JSON responses with Gson
- Structuring a console-driven Java application
- Working with external APIs and API keys
Contributions are welcome. Please open an issue first to discuss any changes, then submit a pull request.
Yuan Retamozo · LinkedIn · yretamozovilca@gmail.com