// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package dotnetversusjava;

public class TypSafEnum {
    public static void main(String[] args) {
        Fruits fru = Fruits.Grape;
        Cars car = Cars.Mercedes;
        //Colors col = (Colors)((int)fru / (int)car);
        //System.out.println(col);
    }
}

enum Fruits { Apples, Oranges, Grape };
enum Cars { Ford, Toyota, Mercedes };
enum Colors { Red, Green, Blue };
