Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Persona{
- private String name,surname;
- private int ci;
- private long tel;
- public int getCi(){
- return ci;
- }
- public void setCi(int ci) {
- if(ci>100000) {
- this.ci=ci;
- }
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name=name;
- }
- public String getSurname() {
- return surname;
- }
- public void setSurname(String surname) {
- this.surname = surname;
- }
- public long getTel() {
- return tel;
- }
- public void setTel(long tel) {
- long maxTel=999999999,minTel=10000000;
- if(tel <= maxTel && tel >= minTel )
- this.tel = tel;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement