0

Why I must make SomeClass2 static to make this code work? Thanks)

https://code.sololearn.com/cauUiIox7TE8/?ref=app

3rd Dec 2019, 11:09 AM
Даниил Ефремов
Даниил Ефремов - avatar
5 ответов
3rd Dec 2019, 11:24 AM
A͢J
A͢J - avatar
+ 3
Даниил Ефремов 😂 Yes you did two mistakes 2 - man 2 - Someclass
3rd Dec 2019, 12:01 PM
A͢J
A͢J - avatar
+ 1
Non-static members cannot access static member since non static are accessed by reference whereas static anywhere in class.
3rd Dec 2019, 11:35 AM
Jayesh Mishra
Jayesh Mishra - avatar
0
you have a typo in extends Someclass should be SomeClass + why are you calling this.perform() inside the perform() itself?
3rd Dec 2019, 11:47 AM
Bahhaⵣ
Bahhaⵣ - avatar
0
bahha, thanks for remark. About perform - its example from lesson so I just typed as it was, I think it is made to take away your eyes.
3rd Dec 2019, 11:51 AM
Даниил Ефремов
Даниил Ефремов - avatar