Why an object of a class is created inside a main method and it does not work if created inside a class without any method?
Loading
Why an object of a class is created inside a main method and it does not work if created inside a class without any method?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted May 13, 2022, 1:49 AM EDT
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted May 13, 2022, 12:01 AM EDT