Why do we use public static with the main function in Java?

Answer Posted / shekhar chauhan

public static void main()- firstly, public which r used
globly access this method in our whole progam. and static
basically used for that we can used only one main method in
whole program.we can not create object that class. so we
make static main method.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a nullable field?

575


What is the indent key?

587


What are the high-level thread states in java programming?

581


placement papaers of spring computing technology

1020


Where is singleton pattern used?

520






Can we override singleton class?

529


What is the use of isempty in java?

534


Which is faster call by value or call by reference?

497


What is native method in java?

561


Can an interface implement another interface?

568


What is the use of static methods?

582


What is ph and buffers?

516


What is stringreader?

523


How do you override a variable in java?

525


Explain about interrupt() method of thread class ?

658