Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
1.2 kB
1
Indexable
Never
package com.example.addingcontacts;

public class Contacts {

    private int id;
    private String name;
    private int number;
    private boolean isActive;

    public Contacts(int id, String name, int number, boolean isActive) {
        this.id = id;
        this.name = name;
        this.number = number;
        this.isActive = isActive;

    }

    public Contacts() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(boolean active) {
        isActive = active;
    }

    @Override
    public String toString() {
        return "Contacts{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", number=" + number +
                ", isActive=" + isActive +
                '}';
    }
}