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
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
0
Thank you very much. It works fantastic.