Program Showing An error occured
My program is showing an error occured it wouldn't run class Addresses{ String cityname,location; int zipcode; Addresses(String cityname, String location,int zipcode){ this.cityname= cityname; this.location= location; this.zipcode= zipcode; } class Employee{ String name; String rank; Addresses addresses; } Employee(String name, String rank, Addresses addresses){ this.name= name; this.rank= rank; this.addresses= addresses; } void display{ System.out.println(name+" "+ rank); System.out.println(addresses.cityname+" "+addresses.location+" "+ addresses.zipcode ); } public class Execute{ public static void main(String args[]){ Addresses n1= new Addresses("Minna","Nigeria", 234);Employee n2= new Employee("Bala Hassan", "Programmer",n1); n2.display(); } }