Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

doubt in transient and volatile

807597Jun 14 2005 — edited Jun 14 2005
Hi,
I have doubt in using transient n volatile modifiers
  class Test
{
      public static final  transient  int i=1;
      public static final  volatile int i=1;  //line 1

}
If i use final n volatile ,having a comp err like
illegal combination of final and volatile.. line 1..while i dont have any problem with
final transient
I didnt understand the reason..Can anyone pls explain?

Thnx.
Mysha.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2005
Added on Jun 14 2005
3 comments
88 views