Answer Posted / sanket mehta
static keyword is meant for providing memory and executing logic without creating Objects, a class does not have a value logic directly, so the static keyword is not allowed for outer class
If you declare the outer class as static, it will not allow to compile giving : Illegal modifier for the class classname; only public, abstract & final are permitted
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is struts in java?
How will you invoke any external process in java?
Can an object be null?
Explain about the main() method in java?
What is the purpose of format function?
What is the difference between heap memory and stack memory?
Is it necessary for the port addresses to be unique? Explain with reason.
Why do we use regex?
When should you use arraylist and when should you use linkedlist?
What about interrupt() method of thread class ?
Why we used vector class?
What is the use of default method in interface in java? Explain
Is string is a data type in java?
Why main method is static in java?
What are the restriction imposed on a static method or a static block of code?