hi people,
i have encountered this error message "unclosed character literal" while compiling the below program using bluej. I wonder what is wrong with the code,do enlighten me. Thanks!!
public class Address
{
private String street;
private String city;
private String zip;
private String state;
//Default constructor
public Address ( )
{
}
//Create address with street, city, state, and zip
public Address ( String street, String city, String state, String zip )
{
this.street = street;
this.city = city;
this.state = state;
this.zip = zip;
}
//Getter method for street
public String getStreet ( )
{
return street;
}
//Setter method for street
public void setStreet ( String street )
{
this.street = street;
}
//Getter method for city
public String getCity ( )
{
return city;
}
//Setter method for city
public void setCity ( String city )
{
this.city = city;
}
//Getter method for state
public String getState ( )
{
return state;
}
//Setter method for state
public void setState ( String state )
{
this.state = state;
}
//Getter method for zip
public String getZip ( )
{
return zip;
}
//Setter method for zip
public void setZip ( String zip )
{
this.zip = zip;
}
//Get full address
public String getFullAddress ( )
{
return street + ' \n ' + city + " , " + state + ' ' + zip + ' \n ';
}
}