0
Any idea what I am doing wrong here
methods https://code.sololearn.com/cWEqYYGbIvvL/?ref=app https://code.sololearn.com/cWEqYYGbIvvL/?ref=app
5 Respuestas
+ 3
You are calling it from a static method so it needs to be static too.
If you wanted to make minororadult non-static, you would need sone kind of object where it belongs to, for example:
Program p = new Program();
p.minororadult(...);
0
Thanks can you help me with the difference?
0
sorry if I have been vague, just wanted to ask why we need static by default here