• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot find symbol method close(java.io.BufferedReader)

 
john merritt
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
john merritt
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem resolved - Thanks for the help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!