• Post Reply Bookmark Topic Watch Topic
  • New Topic

board game tester error  RSS feed

 
Danny Broadwater
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

 
Keith Lynn
Ranch Hand
Posts: 2409
  • 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: 2409
  • 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: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I mean is did you intend to redefine the classes?
 
Paul Clapham
Sheriff
Posts: 22835
43
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: 2409
  • 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: 2409
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!