Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
bhargavaboga
Posts: 14
Registered: 08-11-2009

enum

are there nyother keywords that can be used to replace the word 'enum'. or ny other way in which we can remove the enum error. i have code in j2se, which i need to port to blackberry.this is part of the code which uses enum. MessageAttributeType is used at many places in my code.

 

public interface MessageAttributeInterface {
public enum MessageAttributeType = { Dummy, MappedAddress, ResponseAddress, ChangeRequest, SourceAddress, ChangedAddress, Username, Password, MessageIntegrity, ErrorCode, UnknownAttribute, ReflectedFrom };
    final static int DUMMY = 0x0000;
    final static int MAPPEDADDRESS = 0x0001;
    final static int RESPONSEADDRESS = 0x0002;
    final static int CHANGEREQUEST = 0x0003;
    final static int SOURCEADDRESS = 0x0004;
    final static int CHANGEDADDRESS = 0x0005;
    final static int USERNAME = 0x0006;
    final static int PASSWORD = 0x0007;
    final static int MESSAGEINTEGRITY = 0x0008;
    final static int ERRORCODE = 0x0009;
    final static int UNKNOWNATTRIBUTE = 0x000a;
    final static int REFLECTEDFROM = 0x000b;

    }

 

can someone help, thank you,

 

-bhargava

Please use plain text.
Developer
simon_hain
Posts: 10,780
Registered: 07-29-2008
My Carrier: O2 Germany

Re: enum

enums are not part of j2me, they were added to java afterwards.

http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.

peter_strange wrote:
"This process should happen traumatically for you in both JDE and Eclipse."
Please use plain text.