Guest User

Untitled

a guest
Jan 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. /*
  2. Cache cache = new Cache(2);
  3. cache.set("1", "1");
  4. cache.toString();
  5. cache.set("2", "2");
  6. cache.toString();
  7. Assert.assertEquals("1", cache.get("1"));
  8. cache.set("3", "3");
  9. cache.toString();
  10. cache.set("4", "4");
  11. cache.toString();
  12. Assert.assertNull(cache.get("1"));
  13. Assert.assertEquals("3", cache.get("3"));
  14. Assert.assertEquals("4", cache.get("4"));
  15.  
  16. */
  17.  
  18.  
  19. public class Cache {
  20.  
  21. public Cache(int capacity) {
  22. }
  23.  
  24. public void put(String key, Object o) {
  25. }
  26.  
  27. public String get(String key) {
  28. return null;
  29. }
  30. }
Add Comment
Please, Sign In to add comment