Why Gigster?
    • Top talentTop talent
    • Managed serviceManaged service
    • Liquid workforceLiquid workforce
    • Scalable infrastructureScalable infrastructure
    • Enterprise securityEnterprise security
      Why Gigster?
      • Top talentTop talent
      • Managed serviceManaged service
      • Liquid workforceLiquid workforce
      • Scalable infrastructureScalable infrastructure
      • Enterprise securityEnterprise security

      Java Interview Question

      Use this basic question and answer to prepare for your next Java interview.

      What happens if the main method is not static?


      If a program has a main method without the static keyword, it will compile, but will throw a Runtime Exception with NoSuchMethodError.

      Looking for developers?