A simple currency converter built in Java using the java.net.http package and the ExchangeRate API. This project was created as a learning tool to practice making HTTP requests, handling JSON responses, and building a basic console app in Java.
- Real-time currency conversion using ExchangeRate API
- Simple and interactive terminal menu
- Clean and modular Java code (MVC pattern)
- HTTP client with
java.net.http.HttpClient - JSON parsing with Gson
- Supports custom API base URL and key via config
- Java 17+
- Maven
- Clone the repository
git clone https://github.com/wesleybertipaglia/currency-converter.git- Navigate to the project directory
cd currency-converter-
Create a
app.propertiesfile following the app.properties.example file -
Build the project
mvn clean install- Run the app
mvn exec:java -Dexec.mainClass="com.wesleybertipaglia.Main"-------------------------------------
💱 CURRENCY CONVERSION MENU
-------------------------------------
1. Convert currency
0. Exit
Choose an option: 1
Enter source currency (e.g., USD): USD
Enter target currency (e.g., EUR): BRL
Enter amount: 100
✅ 100.00 USD = 505.76 BRLContributions are welcome! If you have any suggestions or improvements, please open an issue or a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.