[JAVA-621] Added missing code

* https://www.baeldung.com/java-type-erasure introduction code

* https://www.baeldung.com/java-interfaces Electronic interface and Computer class

* https://www.baeldung.com/java-abstract-class BoardGame and Checkers classes

* https://www.baeldung.com/java-hashcode different ways of implementing hashCode

* https://www.baeldung.com/java-inheritance-composition ComputerBuilder and StandardComputerBuilder classes

* https://www.baeldung.com/java-equals-hashcode-contracts Renamed method to match article

* https://www.baeldung.com/java-static Renamed class to match article

* https://www.baeldung.com/java-nested-classes Renamed class to match article
This commit is contained in:
dupirefr
2020-04-28 08:05:50 +02:00
parent 53f6659143
commit c39e3a6a7d
19 changed files with 328 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
package com.baeldung.typeerasure;
public class Example {
public static <E> boolean containsElement(E [] elements, E element){
for (E e : elements){
if(e.equals(element)){
return true;
}
}
return false;
}
}