Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Output?? (http://www.go4expert.com/forums/output-t7691/)

gouri.83 3Dec2007 22:33

Output??
 
Code:

public class TypeSafeHetrogenousExample {


      public static void main(String[] args) {


              List<String> stooges = Arrays.asList("Larry", "Moe",
"Curly");
              List<Integer> fibs = Arrays.asList(1, 1, 2, 3, 5, 8 );

              f.setFavorite(List<String>.class, Stooges);
              f.setFavorite(List<Integer>.class, fibs);

              String s = f.getFavorite(List<String>.class);
              int i = f.getFavorite(List<Integer>.class);

              if(i==0) {
                      System.out.println("expected");
              }else {
                      System.out.println("not sure.");
              }
      }
}


shabbir 3Dec2007 23:17

Re: Output??
 
Submitted as an article and moved to forum for discussion


All times are GMT +5.5. The time now is 10:48.