Skip to content

Instantly share code, notes, and snippets.

View 95Rajitha's full-sized avatar
💭
<Tech Enthusiast/>

Rajitha Bandara 95Rajitha

💭
<Tech Enthusiast/>
  • University of Moratuwa
  • Colombo,Sri Lanka
View GitHub Profile
@95Rajitha
95Rajitha / Example.java
Last active June 2, 2021 17:55
Edge Cases in java type Erasure
public class SampleChild extends Sample<Integer> {
public SampleChild(int size) {
super(size);
}
public void putItems(Integer data) {
super.putItems(data);
}
@95Rajitha
95Rajitha / Example.java
Created June 2, 2021 19:33
Bridge method to solve the edge casses
public class SampleChild extends Sample {
public void putItem(Object data) {
putItem((Integer)data);
}
public void putItem(Integer val) {
super.putItem(val);
}