Advertisement
Guest User

Untitled

a guest
Sep 13th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.38 KB | None | 0 0
  1. class FileCache {
  2.    
  3.     private String value;
  4.     private final BufferedReader reader;
  5.  
  6.     FileCache((BufferedReader reader) {
  7.         this.reader = reader;
  8.     }
  9.  
  10.     public String getValue() {
  11.         return value;
  12.     }
  13.  
  14.     public void next() {
  15.         value = reader.readLine();
  16.     }
  17.  
  18. }
  19.  
  20. class Main {
  21.  
  22.     public static void main(String[] args) {
  23.         FileCache[] list = new FileCache()[3]
  24.         ...
  25.        
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement