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 — OnJava8-Examples/generics/CompilerIntelligence.java at master · lliittllee/OnJava8-Examples Expand file tree/ Copy pathCompilerIntelligence.javaMore file actions 15 lines (14 loc) · 536 Bytes / Copy pathCompilerIntelligence.javaFile metadata and controls15 lines (14 loc) · 536 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // generics/CompilerIntelligence.java // (c)2017 MindView LLC: see Copyright.txt // We make no guarantees that this code is fit for any purpose. // Visit http://OnJava8.com for more book information. import java.util.*; public class CompilerIntelligence { public static void main(String[] args) { List<? extends Fruit> flist = Arrays.asList(new Apple()); Apple a = (Apple)flist.get(0); // No warning flist.contains(new Apple()); // Argument is 'Object' flist.indexOf(new Apple()); // Argument is 'Object' } } |
| 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. |