Skip to content

Instantly share code, notes, and snippets.

@Harishraj16
Created March 18, 2024 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Harishraj16/9d21903665bca0787ebda1104a510fd7 to your computer and use it in GitHub Desktop.
Save Harishraj16/9d21903665bca0787ebda1104a510fd7 to your computer and use it in GitHub Desktop.
public class TreasureChest<T> {
private T treasure;
public void storeTreasure(T treasure) {
this.treasure = treasure;
}
public T retrieveTreasure() {
return treasure;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment