Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Java

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 05-29-2018, 07:15 AM   #1
ajaxdns
Registered User
 
Join Date: Apr 2018
Posts: 1,139
Why main method is static?

because object is not required to call static method if It were non-static method,jvm creats object first then call main() method that will lead to the problem of extra memory allocation.more details...
ajaxdns is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What if the static modifier is removed from the signature of the main method? sunled Java 0 03-26-2018 10:32 PM
Why main method is static? sunled Java 0 03-26-2018 10:31 PM
Why main method is static? sydneyearplug Java 0 02-22-2018 01:19 AM
Why main method is static? sunled Java 1 12-11-2017 08:41 PM
What if the static modifier is removed from the signature of the main method? sunled Graphic Design 0 12-04-2017 11:13 PM


All times are GMT -7. The time now is 08:29 AM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.