Here's my writeToFile() method:
public void writeToFile(String string){
    x.format("%s", string);
}
And this is how I use this method:
private class HandlerClass implements ActionListener{
    public void actionPerformed(ActionEvent event){
        string = tekstPole.getText();
        tekstLabel.setText(string);
        f.writeToFile(string);
    }
}
When I try to compile I get
Exception in thread "main" java.lang.NullPointerException at Files.readFile(Files.java:30) at Bicycle.(Bicycle.java:34) at Hristijan.main(Hristijan.java:10)
What could be the problem?
