Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FileCache {
- private String value;
- private final BufferedReader reader;
- FileCache((BufferedReader reader) {
- this.reader = reader;
- }
- public String getValue() {
- return value;
- }
- public void next() {
- value = reader.readLine();
- }
- }
- class Main {
- public static void main(String[] args) {
- FileCache[] list = new FileCache()[3]
- ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement