---
title: "What if the static modifier is removed from the signature of the main() method?"  
description: "What if the static modifier is removed from the signature of the main() method?"  
author: "Sumit Kesarwani"  
published: 2014-08-23  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/1983/what-if-the-static-modifier-is-removed-from-the-signature-of-the-main-method  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What if the static modifier is removed from the signature of the main() method?

Program compiles. But at runtime throws an error "NoSuchMethodError".

## Answers

### Answer by Sumit Kesarwani

Program compiles. But at runtime throws an error "NoSuchMethodError".


---

Original Source: https://www.mindstick.com/interview/1983/what-if-the-static-modifier-is-removed-from-the-signature-of-the-main-method

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
