intro/SampleClass

From ggc

Jump to: navigation, search

01 package intro;
02 //start auto-imports
03 import java.util.*;
04 import java.io.*;
05 //end auto-imports
06 
07 public class SampleClass
08 {
09   private int count;
10   private Scanner file;
11 
12   public SampleClass(int startingCount)
13   {
14     count=startingCount;
15   }
16 
17   public void tick()
18   {
19     count++;
20   }
21 
22   public String toString()
23   {
24     return "Count: "+count;
25   }
26 
27   public String getSomethingElse()
28   {
29     return "Something else";
30   }
31 }


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