It's not a secret anymore!
The moose likes Beginning Java and the fly likes Requiring boolean... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Requiring boolean..." Watch "Requiring boolean..." New topic

Requiring boolean...

Brad Dwan
Ranch Hand

Joined: Apr 22, 2010
Posts: 62
Just running through an exercise for uni. Its saying that I need a bool and program fails. I understand what its asking for, and its refering to a getter.

Reason for the program just changing class data.

any help?

ps. I know this is a pointless program, but it goes to the teacher anyway. So yer.

"It's about choosing your battles, not fighting somebody else's war"
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15082

It would help a lot if you copy & pasted the error message. I don't see anything wrong in line 61 at first sight.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Nicola Garofalo
Ranch Hand

Joined: Apr 10, 2010
Posts: 308
I don't get you problem, sorry.
Everything is fine in your program.
I tryed it and it compiles and runs perfectly

Brad Dwan
Ranch Hand

Joined: Apr 22, 2010
Posts: 62
Don't worry, figured it out. I just retyped in salary in the ternary operator. strange. Thanks anyway!
I agree. Here's the link:
subject: Requiring boolean...
It's not a secret anymore!