intro/SampleClassTest

From ggc

Jump to: navigation, search

01 package intro;
02 
03 
04 /**
05  * All about my application.
06  @author My Name Here
07  */
08 public class SampleClassTest
09 {
10   public static void main(String[] args)
11   {
12     SampleClass sample;
13     sample=new SampleClass(10);
14     SampleClass sampleAnother;
15     sampleAnother=new SampleClass(5);
16     System.out.println("sample is "+sample);
17     System.out.println("sampleAnother is "+sampleAnother);
18     sample.tick();
19     System.out.println("sample is "+sample);
20     System.out.println("sampleAnother is "+sampleAnother);
21     sample.tick();
22     System.out.println("sample is "+sample);
23     System.out.println("sampleAnother is "+sampleAnother);
24     sampleAnother.tick();
25     System.out.println("sample is "+sample);
26     System.out.println("sampleAnother is "+sampleAnother);
27     sample.tick();
28     sampleAnother.tick();
29     System.out.println("sample is "+sample);
30     System.out.println("sampleAnother is "+sampleAnother);
31     //happens automatically - System.out.println(sample.toString());
32     System.out.println(sample.getSomethingElse());
33   }
34 }


Download/View intro/SampleClassTest.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