I am a complete beginner, so would greatly appreciate some help. According to the API documentation the method I am calling is correct for the import. Obviously I have not understood the basics – can somebody please point me in the correct direction?
In Java "this" keyword refers to the current object. So in this case "mytest" object (which is of type FileTest) you have created in the main method. FileTest doesn't have a method call "close()" hence the error.