Java – Places where “public static void main(String[] args)” can be put

Most of Java programmers are only familiar with having the following method in a class to start the application from.

Well, there are other places you can put that static method and start the application from.

In an Interface

This outputs

In an abstract class

This obviously outputs

Karl San Gabriel

Karl San Gabriel

Java and Enterprise Technologies Expert