I have added code tags to your post, and you can see how much better it looks. Please always use them. Also avoid tabs for indenting; use spaces instead.
What was the error? you should always tell us.
Now I have indented the code, you can see there is a statement outside a method. I think you wanted a } two lines later than you actually wrote.
posted 5 years ago
Compile time error is :
Subclass.java:15: error: <identifier> expected
If you put code outside a method (or constructor or initializer), that code can only consist of declarations. And those declarations would be declaring either instance variables or class variables, depending on whether you used the "static" modifier. Any other code (i.e. any code which isn't a declaration) has to go inside a method (or constructor or initializer).