fork download
  1. import java.io.FileNotFoundException;
  2. import java.io.PrintWriter;
  3. /**
  4.  *
  5.  * @author HZembr01
  6.  */
  7.  
  8. public class Zapis{
  9. public static void main(String[] args) throws FileNotFoundException{
  10. PrintWriter zapis = new PrintWriter("HZjava.txt");
  11. zapis.println("Dzis sa zajecia nr 6");
  12. zapis.close();
  13. }
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:8: error: class Zapis is public, should be declared in a file named Zapis.java
public class Zapis{
       ^
1 error
stdout
Standard output is empty