Sagar
An odd one. First, I don't think serialization is in the Programmer's certification objectives - I've just done a quick search on the objectives at Marcus Green's site and didn't get a hit.
Second, the question looks like a "is a" versus a "has a" object theory question and I would have answered as you did, except that, judging by the supplied answer, they only wanted the class declaration. If that was made clear in the question then it might have been a cryptic clue to the answer they wanted.
Thirdly, the File class implements Serializable, so by extending File your Answer class also implements Serializable. This means your answer also contains the correct answer.
But, all that aside, and working backwards from the answer they've given, I guess their rationale is that "behaving like a file" means achieving some sort of persistence and the Serializable interface enables a type of persistence, I suppose.
Hopefully the real
test won't have such a loose question, and hopefully we don't need to cover Serializable.