Alright so, as always, my mutators don't work. Here's my code:
public class StreetAddress
{
Type: Posts; User: ghostheadx
Alright so, as always, my mutators don't work. Here's my code:
public class StreetAddress
{
So now, hopefully I can get some setters working. Thanks.
Okay, so how's this for a start:
public class StreetAddress{
public String street;
I thought that declaring a variable essentially meant:
int five = 5;
It would store the number "5" in the data space, represented by 5, which is an integer. That's what my understanding...
I thought that you didn't declare fields variables in a constructor.
--- Update ---
@GregBrannon
I just sort of thought that a constructor looked like this per-say:
public class StreetAddress{
public String street;
public String city;
public String state;
I knew most of it was titled wrong, because I was sort of not focused on the titles. I actually tried to copy this guy's programming:
Accessors and mutators in Java - YouTube
I think that was a...
public class StreetAddress ()
{
public StreetAddress(){
private String number;
private String Street;
private String city;
private String zip;...
Here's what I need to do for Lab 14:
The StreetAddress class has this constructor:
StreetAddress( String street, String city,
String state, String zip );