+ 1
Static method
How to define method in Main if we not use "static" with method at declaration?
2 Respostas
+ 1
~ swim ~ Yes I thought in perspective of java. It's working in C#
https://code.sololearn.com/c99O2yjQu4Q4/?ref=app
0
Bilal Ahmed In main method everything will be static doesn't matter that you used static keyword or not. But you can call that method only in main method itself. You can't call them outside.
Edited :- In java We can't create method directly in main. In case of this code we can create method using local class.
https://code.sololearn.com/cRtRQuJUrg8s/?ref=app