
problema con tipo enum en java
Publicado por manu (4 intervenciones) el 03/03/2014 19:24:36
Buenas tardes:
Un problema muy básico que tengo y que por más que leo y pruebo estoy estancado:
En el siguiente código no soy capaz de inicializar las variables de tipo enum:
Me da el siguiente error: cannot find symbol-variable NORMAL
Si alguien me pudiera ayudar le estaría muy agradecido.
Un problema muy básico que tengo y que por más que leo y pruebo estoy estancado:
En el siguiente código no soy capaz de inicializar las variables de tipo enum:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public class Vehicle
{ enum TType{ NORMAL, FAMILIAR } enum TGate{A, B, C, D
}private int id;
private TType type;
private TGate gate;
private int hour;
/*
* Constructor for objects of class Vehicle
*/public Vehicle(int id, TType type, TGate gate, int hour)
{this.id = id;
this.type = type;
this.gate = gate;
this.hour = hour;
}}Me da el siguiente error: cannot find symbol-variable NORMAL
Si alguien me pudiera ayudar le estaría muy agradecido.
Valora esta pregunta


0