开发者

I'm having an issue with the following code and haven't been able to debug it

Error says something about eZip not being recognized or something

public class Address
{     
   private String name;
   private String street;
   private String city;
   private String state;
   private String zip;

   public开发者_开发问答 Address(String aName, String aStreet,
         String aCity, String aState, String aZip)
   {  
      name = aName;
      street = aStreet;
      city = aCity;
      state = aState;
      zip = eZip;
   } 
}


um, perhaps it is because the parameter you gave is called aZip and eZip is not something you've made anywhere else I'm assuming.


You're declaring the constructor parameter

...String **aZip**)

And then referencing at the bottom of your constructor

zip = **eZip**; 

You just misstyped, that's all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜