Kamalakannan Cm

Greenhorn
+ Follow
since Jul 14, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kamalakannan Cm

Before Java SE 5, Runtime.exec() method was used. In Java SE 5, we got a new class ProcessBuilder which gives
more flexibility for executing external executables.

here is an example using both of these approaches

http://www.java-tips.org/java-se-tips/java.util/from-runtime.exec-to-processbuilder.html

Regards
kamal
13 years ago
You need to call the static method from your main method in the Tester class as below


public static void main (String [] args )
{
/** Scanner to read user input*/
Scanner reader = new Scanner(System.in);

System.out.println ( " Enter a Year from 1900 to 2299: ");
int newYear = reader.nextInt();
boolean leap = LeapYearExpert.isLeapYear(newYear);

if (leap)
System.out.println("It is a Leap Year");
else
System.out.println("It is not a Leap year");

}

if you want to get three years, then you need to use some loop to repeat the same thing for three times

Regards
kamal
13 years ago