Skip to content

Instantly share code, notes, and snippets.

@AdelinGhanaem
Last active February 18, 2016 20:43
Show Gist options
  • Select an option

  • Save AdelinGhanaem/530a9bf2a7481589ab64 to your computer and use it in GitHub Desktop.

Select an option

Save AdelinGhanaem/530a9bf2a7481589ab64 to your computer and use it in GitHub Desktop.
package com;
/**
* Created by adelin.ghanayem@cayetanogaming.com on 2/16/16.
*/
public final class User {
private final String name;
private final boolean isActive;
private final String userId;
// can be constructed using this constructor ONLY !
public User(String name, boolean isActive, String userId) {
this.name = name;
this.isActive = isActive;
this.userId = userId;
this.address = address;
}
public String getName() {
return name;
}
public boolean isActive() {
return isActive;
}
public String getUserId() {
return userId;
}
}
@Darsstar
Copy link

this.address = adress; should be deleted as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment