Main Method auto generation in java Eclipse example

(Last Updated On: [post_updated])

As we know main method is first method java begins its execution. That main method we can generate using two ways in eclipse
Way 1:

While creating the class, we can enable the “public static main method(String[] args) checkbox”,


Way 2:

If we have created the class without enabling the checkbox, then no need to delete and create it again. We can simply create simply typing main with ctrl+shift.


Recommended Books:

267 total views, 0 views today

Leave a Reply

Your email address will not be published. Required fields are marked *