Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to declare byte enum

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to declare byte enum

    Hi friends,

    I am new to Java, but at advance states in c#. Is it possible anyone of you to help me? I tried to search a lot of places but not able to find exact implementation or may be I am not able to understand.

    I have this enum in c#
    public enum Channel : byte
    {
    X = 0x00,
    Y = 0x01,
    Z = 0x0E,

    }

    I wish to convert it to Java enum.
    so that I can access it like Channel.Z

    Thanks in advance.


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: How to declare byte enum

    Enum Types (The Java™ Tutorials > Learning the Java Language > Classes and Objects)

Similar Threads

  1. [SOLVED] Enum types, how does he know %s value?
    By beer-in-box in forum Java Theory & Questions
    Replies: 11
    Last Post: September 17th, 2011, 12:47 PM
  2. [SOLVED] Enum problem
    By pajfilms in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 21st, 2011, 07:26 AM
  3. caught or declare might be thrown error
    By IDK12 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: January 28th, 2011, 12:55 PM
  4. [SOLVED] How to declare an object of multi-dimension array?
    By FongChengWeng in forum Collections and Generics
    Replies: 7
    Last Post: January 14th, 2011, 12:17 AM
  5. [SOLVED] Method declaration in Java
    By mohsendeveloper in forum Object Oriented Programming
    Replies: 4
    Last Post: June 11th, 2009, 03:18 AM