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 — JavaGeneric/JavaGenMUB14.java at main · AvinandanBose/JavaGeneric Expand file tree/ Copy pathJavaGenMUB14.javaMore file actions 31 lines (24 loc) · 871 Bytes / Copy pathJavaGenMUB14.javaFile metadata and controls31 lines (24 loc) · 871 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 public class JavaGenMUB14<T extends Object & Comparable<T>> { T value; public JavaGenMUB14(T value) { this.value = value; } public T getValue() { return value; } public void setValue(T value) { this.value = value; } public int compareTo(JavaGenMUB14<T> other) { return value.compareTo(other.value); } public static void main(String[] args) { JavaGenMUB14<String> obj = new JavaGenMUB14<String>("Hello"); System.out.println(obj.getValue()); obj.setValue("World"); System.out.println(obj.getValue()); JavaGenMUB14<String> obj2 = new JavaGenMUB14<String>("Hello"); System.out.println(obj.compareTo(obj2)); System.out.println(obj.compareTo(new JavaGenMUB14<String>("World"))); } } |
| You are visitor 01402503 — 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. |