- /** SomeObject class
- *
- * @author tkrogers
- * @version
10-01-2011
- */
- public class
SomeObject {
- int
x ;
- String statement ;
-
-
public SomeObject ( ) {
-
statement = " This is jolly fun! " ;
- x =
1 ;
- }
-
- //
The code below overrides or in other words,redefines
- // the
toString method that has been automatically inherited
- // by this
class.
- //
public String toString ( ) {
- //
return statement + x ;
- //
}
- }