Java Programming - Problem with java.io.Reader
Hello!
I have written the following code on jdk 6
package hmm;
import java.io.FileReader;
import java.io.Reader;
import java.util.Vector;
import be.ac.ulg.montefiore.run.jahmm.io.ObservationSequencesReader;
import be.ac.ulg.montefiore.run.jahmm.io.ObservationVectorReader;
public class papa {
Reader reader = new FileReader("test.seq");
Vector v = ObservationSequencesReader.
readSequences(new ObservationVectorReader(), reader);
reader.close();
}
The eclipse environment i am using indicates that the reader.close() statement is wrong and marks the "close" method writing
Syntax error on token "close";Identifier expected after this token
I really dont know the cause of this problem because the it was taken directly from a help file in the jahmm library (http://www.run.montefiore.ulg.ac.be/~francois/software/jahmm/)
i am using.
I have added this library at the build path and as you can see from the import statements i use some methods from it.
I would be grateful if someone could help me soon,as fixing this code is an essential piece of my thesis work..!!
Thank you in advance!
Harris

