Please use a
thread title which makes it obvious what the question is about. "Variable might not have been initialized" would have been a better title. Then people reading the contents list can better choose which threads to reply to.
Please don't write "abt" or "alrite": look at
this FAQ for an explanation.
Why are you declaring IOException from MeltPlot? If you really have to declare that Exception from the MeltPlot constructor, you will have to instantiate it like this
I think you have a design problem; you are opening a BufferedReader in the MeltPlot constructor; you ought to open the Reader when you need to read from the file, then close it again immediately. Make the reader a local variable of the method, not a field, nor a constructor local variable. You ought also to do the Exception handling in that method. It would read something like this
The reason for the finally inside a try is to make sure the reader is definitely closed. Make sure there is only one statement inside such a finally; if you had two statements and teh first threw an Exception the second would never execute. Because the close() method declares IOException, the finally has to be inside a try. So you end up with a try with a try-finally inside.
You are obviously familiar with the ((line = something.readLine()) != null) syntax. You don't appear to be familiar with the methods of the Double class, however. There is a simpler way to get a double from a
String.
Why are yuou declaring a StringBuffer (StringBulder would be better) in the constructor and never using it?