java Programming Glossary: tomato
How to make a Java class that implements one interface with two generic types? http://stackoverflow.com/questions/1297972/how-to-make-a-java-class-that-implements-one-interface-with-two-generic-types like public class TwoTypesConsumer implements Consumer Tomato Consumer Apple public void consume Tomato t ..... public void.. Consumer Tomato Consumer Apple public void consume Tomato t ..... public void consume Apple a ...... Apparently I can't.. Object public void consume Object o if o instanceof Tomato ..... else if o instanceof Apple ..... else throw new IllegalArgumentException..
|