0
Is it necessary to declare PSVM inside class? Can we declare PSVM without class in java?
can public static void main(Strinf args[]) declared without being object of any class
4 Respuestas
+ 9
No; you cannot declare or define a method outside a class in Java.
+ 9
Sukhbir khalsa You need an explanation perhaps...
The most useful reference I've found:
https://www.quora.com/Can-we-declare-the-member-function-outside-the-class-in-Java-If-Yes-How-No-Why
+ 2
thanks Dev
0
why Dev