GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Source-Code-from-Tutorials/Java_Beginners/45_javaBeginners.java at master · SF5/Source-Code-from-Tutorials Expand file tree/ Copy path45_javaBeginners.javaMore file actions 39 lines (30 loc) · 972 Bytes / Copy path45_javaBeginners.javaFile metadata and controls39 lines (30 loc) · 972 Bytes 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 28 29 30 31 32 33 34 35 36 37 38 39 import java.util.EnumSet; public class apples { public static void main(String[] args){ for(tuna people: tuna.values()) System.out.printf("%s\t%s\t%s\n", people, people.getDesc(), people.getYear()); System.out.println("\nAnd now fpr the range of constants!!!\n"); for(tuna people: EnumSet.range(tuna.kelsey, tuna.candy)) System.out.printf("%s\t%s\t%s\n", people, people.getDesc(), people.getYear()); } } public enum tuna { bucky("nice", "22"), kelsey("cutie", "10"), julia("bigmistake", "12"), nicole("italian", "13"), candy("different", "14"), erin("iwish", "16"); private final String desc; private final String year; tuna(String description, String birthday){ desc = description; year = birthday; } public String getDesc(){ return desc; } public String getYear(){ return year; } } |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |