First learn C / C to learn Java friends may think that Java is not enorma type is very inconvenient. This problem can be solved by interface:
For example, define an interface:
Public Interface Animal
{
INT DOG = 1, CAT = 2, Tiger = 3, Snake = 4;
}
Public Class Test Implements Animal
{
Public test ();
Public Boolean IsDog (int Atemal)
{
Return (Animal == DOG)? TRUE: FALSE;
}
}