The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


switch statement again

Posted by jianbo on January 11, 2001 at 8:17 AM

> In theory it should noy give such a problem. Again check ManagerCommand class and make sure you have declared SOME_NOTIFICATION as final int. On JDk 1.3 it compiles and runs fine.
> Maybe a jdk version problem.

Thanks for your response to my question, Kishori.
Sorry, I forget to tell you one more thing:
In ManagerCommand, I have:

private static int base = 0;
public static final int SOME_NOTIFICATION = base++;

this "base++" caused my problem and I don't know how to get around of it. Since I have about 50 SOME_NOTIFICATION#, I hate to use if-else to handle them. I am using JDK1.3.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us