• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

board game tester error

 
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you please help with an error in board game tester

Here is the code


here is the error

 
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are defining your own classes. That is, instead of using the BufferedReader and InputStreamReader from java.io, you are defining your own classes, but they don't implement the AutoCloseable interface.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand. DO I have to remove the classes? What would be the best thing to do, are were do I start?
 
Keith Lynn
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean to redefine the classes?
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes redefine the classes, I am at a total loss right now.
 
Keith Lynn
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I mean is did you intend to redefine the classes?
 
Marshal
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keith is doing fine, but let me just jump in and stir the pot a bit:

Does your assignment specifically say that you have to write your own versions of BufferedReader and so on from the standard API? That seems a bit unlikely to me, it would just distract from the main task, which I suppose is the game board.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did redefine my classes, and everything is working ok. Thanks for your time and help.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me with some errors in my code.

FileManager


With the public static void writeToFileAsync(final String saveState, final String fileName) {
I receive the Illegal start of expression.

 
Keith Lynn
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually that errors means you haven't closed a block. That is, you have a { without a }
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found that error and fixed it , but I still receive the same error Illegal start of expression.


 
Keith Lynn
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it doesn't appear you've fixed that problem. Note where writeToFile ends.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand, the one you referenced closes the one above it public void run() { So I don't understand.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!