jam/AllObject

From ggc

Jump to: navigation, search

01 package jam;
02 
03 import wiki.Wiki;
04 import fang.*;
05 import lights.*;
06 import java.util.*;
07 /**
08  * All about my application here.
09  @author Jam Jenkins
10  */
11 public class AllObject
12 {
13   public static void main(String[] args)
14   {
15     //ArrayList<String> all="happy";
16     Object all="happy";
17     Wiki.out.println("all is "+all.toString());
18     all=new ArrayList<String>();
19     Wiki.out.println("all is "+all.toString());
20     all=new OvalSprite(11);
21     Wiki.out.println("all is "+all.toString());
22     all=new LightsOutModel();
23     Wiki.out.println("all is "+all.toString());
24 
25     ArrayList everyThing=new ArrayList();
26     everyThing.add(new Integer(5));
27     everyThing.add("Happy");
28     int x=((Integer)everyThing.get(0)).intValue();
29 
30     ArrayList<Integer> easier=new ArrayList<Integer>();
31     easier.add(5);
32     //easier.add("Happy");
33     int y=easier.get(0);
34   }
35 }


Download/View jam/AllObject.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter