• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why this is giving error

 
Anchit Jindal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code at
http://pastebin.com/diz9Q9sm
is giving the following error:

B.java:17: <identifier> expected
b.print();

1 error

Please explain the reason

Thanks a lot...
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The line in question is outside a method.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please just paste your code into your messages; the syntax highlighting is good enough and saves us a step. Thanks! :)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic