|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object example.LeapYearReady
public class LeapYearReady
A very simple example how to use ComTest as a definition and testing tool. In this first example we test simple function.
Constructor Summary | |
---|---|
LeapYearReady()
|
Method Summary | |
---|---|
static boolean |
isLeapYear(int year)
Check if year is a leap year. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LeapYearReady()
Method Detail |
---|
public static final boolean isLeapYear(int year)
year
- to check
isLeapYear(1900) === false; // divisible by 100 isLeapYear(2000) === true; // divisible by 400 isLeapYear(2003) === false; // odd number isLeapYear(2004) === true; // divisible by 4 isLeapYear(2010) === false; // not divisible by 4
public static void main(java.lang.String[] args)
args
- not used
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |