Originally posted by podonga poron: [QB]What is this code doing ? enum translateSpanish{ HELLO("Hola"), BYE("Chau"); String responce; // what is doing here [B]Declaring a String attribute[/B] translateSpanish(String get){ responce = get; //what is doing here [B]assigning one reference to another[/B] } } class testEnum{ static translateSpanish ts; //can you call a class using static ? // [B]it's declaring an static attribute of enum type translateSpanish[/B] public static void main(String[] args){ System.out.println(ts.HELLO.responce); //why this concatenation ? //[B]It's not a concatenation. [/B] //[B]The "." operator is used to call a message in one object.[/B] //[B]It's getting the value of the responce attribute from the HELLO enum[/B] } } Take a look at this and this to understand better about enums
-- Rodrigo Lopes