0

Java - how can I reach these variables

Hello. I am practising OOP in java and need to know how can I reach some variables. I have a guild object that has money and XP attributes and one owner object. The owner has pay and buyXP methods and I need to know how can I change guild's money attribute from pay and buyXP methods. All I need to know written in comments. Can you help me please? https://code.sololearn.com/cZpzlrhir37N/?ref=app

13th Mar 2018, 2:57 PM
Jan Štěch
Jan Štěch - avatar
2 Respostas
+ 4
Fixed compile errors, added arguments so owner can access guild, put in comment requested code, and displayed results. https://code.sololearn.com/co2p3b3789Gk
13th Mar 2018, 8:56 PM
John Wells
John Wells - avatar
0
Thank you very much. It works fantastic.
14th Mar 2018, 6:07 AM
Jan Štěch
Jan Štěch - avatar