I have put the right answer in but the system still says that it is wrong. So does anyone know the trick to form the answer to get this right way?
I'm pretty sure we're allowed to check the answers to self-check questions so you can look them up if you tried it and are stuck
Yes: https://www.buildingjavaprograms.com/self-check-solutions-3ed.html#ch05