Java API Wrapper for getting real-time Coronavirus (COVID-19, SARS-CoV-2) statistics via https://git.io/Jvoep.
class Main {
public static void main(String[] args){
// Create an instance of the API.
Coronavirus coronavirus = new Coronavirus();
// Get latest data.
Latest latest = coronavirus.getLatest();
System.out.println("Latest Coronavirus Data:");
System.out.println("Confirmed Cases: " + latest.getConfirmed());
System.out.println("Deaths: " + latest.getDeaths());
System.out.println("Recovered: " + latest.getRecovered());
}
}
You can add the library to your project via Jitpack.