Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

records java final

public class Person {

    private final String name;
    private final String address;

    public Person(String name, String address) {
        this.name = name;
        this.address = address;
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, address);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        } else if (!(obj instanceof Person)) {
            return false;
        } else {
            Person other = (Person) obj;
            return Objects.equals(name, other.name)
              && Objects.equals(address, other.address);
        }
    }

    @Override
    public String toString() {
        return "Person [name=" + name + ", address=" + address + "]";
    }

    // standard getters
}
Comment

PREVIOUS NEXT
Code Example
Java :: Dio.java 
Java :: this java 
Java :: TestNG Data Provider example 
Java :: exit for loop java stack overflow 
Java :: convertBirthDay java 
Java :: kill no entity was found minecraft 
Java :: RecyclerView scrolled UP/DOWN listener 
Java :: java como comprobar que un numero es entero? 
Java :: activity selection java solution 
Java :: nikita kaksharov 
Java :: Reverse Order Output for Java Do-While Loop 
Java :: masquer saisie mot de passe java console 
Java :: intellij run single java file 
Java :: hide frame ( acces to the top level component ) 
Java :: java how to make a recrussive boolean function 
Java :: Save SQLite returned data to an object list 
Java :: java decrypt CryptoJS 
Java :: how to send rest request graphql java 
Java :: java vererbung methoden 
Java :: material motion android navigation arch 
Java :: java cannot resolve the list method 
Java :: single line comment in java 
Java :: MinimumAndMaximum 
Java :: snapshot for loop android java 
Java :: crud repository count number of items in a list 
Java :: java map get value 
Java :: java 8 seconds to days 
Java :: Jlabel icon 
Java :: junit maven dependency 
Java :: search in 2d matrix 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =