Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Requiring boolean...

 
Brad Dwan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15272
37
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help a lot if you copy & pasted the error message. I don't see anything wrong in line 61 at first sight.
 
Nicola Garofalo
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't worry, figured it out. I just retyped in salary in the ternary operator. strange. Thanks anyway!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic