Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Harley Evans   on Nov 12 In Java Category.

  
Question Answered By: Mario Ryan   on Nov 12

I notice that you use lot of "if" statements alone. i.e:

if(something)
(There should be something her before going to the next if, or use { } between
the next statements if they are dependant on the above one )
if(somethinglese)


As I understand the problem, you need to use else { } between all of what
follows:

if (isLeap == false)
System.out.println ("It is unknown " + year  + " is a leap
year.");


else

{

the rest of the program

}


Try it and let me know if that makes or doesn't make sense.

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on program to end if the year is less than 1582. Or get search suggestion and latest updates.


Tagged: