Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Reader;
- import java.util.Scanner;
- public class ScannerReader {
- public Object readFile(String fileName) {
- try {
- Scanner file = new Scanner( new File(fileName));
- int i=0;
- while(file.hasNextLine()) {
- rectangles[i++] = new ColorRectangle()
- file.nextInt();
- file.nextInt();
- file.nextInt();
- file.nextInt();
- file.nextInt();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment