isLeapYear help needed

I'm a student in a college intro java class and I'm trying to send a variable into the isLeapYear method to determine if its a leap year

I want to use a while loop to determine if a given year is a leap year, and if it isnt, to ask for another year until it gets a leap year

I'm getting 'unexpected type' in the following:

while(cal.isLeapYear(year) = false)

Expected: variable

found: value

cal is a new GregorianCalendar i've created in main andyear is the variable I want to send into the isLeapYear method

is there any way to do this?

[607 byte] By [sheepboy2400a] at [2007-10-2 8:03:25]
# 1
> while(cal.isLeapYear(year) = false)Change the "=" to "==" Your code is making an assignment, not a comparison.Assuming your cal.isLeapYear(year) returns a boolean, you can use the simpler while(cal.isLeapYear(year)) or the inverse, instead.
ChuckBinga at 2007-7-16 21:56:16 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
PLEASE DON'T POST DUPLICATE questions. You caused me to waste my time answering this!
ChuckBinga at 2007-7-16 21:56:16 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...