0

If there is a file created and stored in a class:

void setLogFile(File LogFile){
        this.LogFile=LogFile;
    }
    File getLogFile(){
        return LogFile;
    }

and the FormattedWriter is created in another class and it's constructor calls super.
Why won't this work?

FormattedWriter out = new FormattedWriter(new FileWriter(getLogFile(),true));
3
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by ceyesuma
0

datz great.... if you could post what have u figured out, it can be a good reference for future... :)

0

Throughout the duration of the program getters and setters were used to create and store primitives and objects such as files. The objective of the program was writing different files.It was then time to simply pass the data members as arguments to the methods in different classes that contained the file writers.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.