why java main method is given as static method?

Answer Posted / saravanan.v

Java is a object oriented language.So even main method also should be written inside a class name main class.So main method should be called WITHOUT CREATING OBJECT for main class.For this purpose, it is declared as static.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the principle concepts of oops?

734


What is a generic code?

731


What is a control variable example?

752


What is immutable state?

730


Is 0 true or is 1 true?

705


What is a Transient Object?

826


What is meant by nested loop?

792


What are the differences between Java 1.0 and Java 2.0?

1901


Is array primitive data type in java?

753


What are keywords and reserved words in java?

787


What are internal and external variables?

728


List out benefits of object oriented programming language?

668


How to create a base64 decoder in java8?

783


Is int primitive data type?

741


What is finalize()?

871