Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Test {
- public static void main(String[] args) {
- File file = new File("daten_org.txt");
- try {
- file.createNewFile();
- } catch(IOException e) {
- System.out.println("ERROR: Datei konnte nicht erstellt werden");
- }
- try {
- PrintStream prs = new PrintStream(file);
- } catch (IOException e) {
- System.out.println("ERROR: PrintStream konnte nicht erstellt werden.");
- }
- int j;
- for(int i = 0; i < 165; i++) {
- j = (int) (Math.random() * 999);
- prs.print(j + " ");
- }
- prs.close();
- }
- }
- ---------------------------------------------------------------------------------------------------------------------------------
- test.java:19: error: cannot find symbol
- prs.print(j + " ");
- ^
- symbol: variable prs
- location: class Test
- test.java:21: error: cannot find symbol
- prs.close();
- ^
- symbol: variable prs
- location: class Test
- 2 errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement