When we tried to run the following program then it successfully runs.
class with {
public static void main(String args[]) {
System.out.println("With static");
}
}
but even if we tried to run the following program it did't ran successfully.
class without {
public void main(String args[]) {
System.out.println("With static");
}
}
we know becuase in this program we have't use static
in main()
method. So, we want to ask that the : - is it possible to run java program without static ? if is it possible then how can i do this.