Skip to content

Instantly share code, notes, and snippets.

@95Rajitha
Last active May 10, 2021 18:35
Show Gist options
  • Save 95Rajitha/8697dbecde73cb361ff3f43508b55205 to your computer and use it in GitHub Desktop.
Save 95Rajitha/8697dbecde73cb361ff3f43508b55205 to your computer and use it in GitHub Desktop.
after the comiler replacement.
public class Sample{
private Comparable [] listOfItems;
public Sample(int size) {
this.listOfItems = (Comparable[]) new Object[size];
}
public void putItems(Comparable data) {
// implementation
}
public Comparable getItems() {
// implementation
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment