Promi_38

Country

Dec 7th, 2021
727
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Country {
  2.  
  3.     String countryName = "";
  4.     String countryCode = "";
  5.     String continent = "";
  6.  
  7.     Country(String countryName, String countryCode, String continent) {
  8.         this.countryName = countryName;
  9.         this.countryCode = countryCode;
  10.         this.continent = continent;
  11.     }
  12.  
  13.     public void getCountry() {
  14.         System.out.println("Country        : " + this.countryName + "\n"
  15.                 + "Country Code   : " + this.countryCode + "\n"
  16.                 + "Continent      : " + this.continent + "\n\n");
  17.     }
  18. }
  19.  
RAW Paste Data