Below are the recommendation from section 5.1 of this essay.While Java is not a pure object-oriented language, it is possible to program in a pure object-oriented style by obeying the following rules:1) Classes only as constructors A class name may only be used after the keyword new.2) No primitive equality The program must not use primitive equality (==). Primitive equality exposes representation and prevents simulation of one object by another.3) In particular, classes may not be used as types to declare members, method arguments or return values. Only interfaces may be used as types. Also, classes may not be used in casts or to test with instanceof.This is generally considered good object-oriented styleFor instance, below part of jdk code does not follow third point mentioned above:return type of toArray method.public Object[] toArray() {     //whatever   }in java.util.AbstractCollection.or return type of toString() nethod.public String toString() {        //whatever    }below part of jdk code does follow third point above:public Iterator<E> iterator() {        return new Itr();    }What advantages do we find in following these recommendation? Can some design patterns be pulled in(automatically), by following such recommendations?
Advantages of these recommendations in ooprogramming using Java
java;design;design patterns;object oriented;interfaces