Hi, Sagar
1)I found nothing in the JLS mentioning the restrictions that you wrote.
And you are right, I compiled it too and it works.
2) The whole point of declaring a member variable transient is to avoid the automatic serialization of
instance members that would otherwise happen. It is pointless to declare a member variable as static because static "members" won't get serialized. And it is pointless to declare member variables that are constants (static final).
3) You do need to implement Serializable (or Externalizable) on a class that you will be serializing instances (of the class).
Here is some code, stored in TransientTest2.java
------------------
Hope this helps.
Have a good day.