Java: Static transient fields
问题 I just found out in Java you can declare a field 'static transient' - the compiler doesn't complain. This doesn't seem to be useful in any way since static fields are not serialized, as we all know. But I wonder, is there actually a case where 'static transient' fields are useful? 回答1: Nope - you said it yourself, static fields aren't serialized. Kinda weird that the compiler lets you do that though. 回答2: In most cases, it is not useful. Static fields are indeed not serialized by the default