Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. package cvi6.demonstrations;
  2.  
  3. import java.lang.ref.SoftReference;
  4.  
  5. public class Reference {
  6.     public static SoftReference<String> ref() {
  7.         String some = "neco";
  8.         return new SoftReference<String>(some);
  9.     }
  10.    
  11.     public static void main(String[] args) {
  12.         SoftReference<String> soft = ref();
  13.         String some = soft.get();
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement