Hi john merritt, Welcome to JavaRanch
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.