Need to use public,static keywords in main function?

Answer Posted / aravinda reddy

1) Public access modifier specifies class declared can be
accesses from anywhere

2) where as static refers with out creating instance of the
class JVM should access the main class while executing.

3) void specified main function should not return any value

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you start a new line in java?

528


Why put method is idempotent?

472


Where is singleton pattern used?

532


What are the actions that can occur when a thread enters blocked state?

591


What is visibility mode?

539






What are the concepts of 'OOPS'?

609


Tell me the Importent classes in net package?

1590


What does the “static” keyword mean?

590


What is the differences between c++ and java? Explain

593


What is java objectoutputstream?

551


How do weakhashmap works?

598


How does varargs work in java?

617


Can an integer be null java?

565


Explain differences between checked and unchecked exceptions in java?

645


What is the map interface in java programming?

595