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

Answer Posted / sai

public is used so that it can be called easily from outside
the scope of function.Static is used so that it can be
easily called without using its object.

Is This Answer Correct ?    37 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is ruby built on java?

529


What is a class object?

496


Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

651


Explain the public class modifier?

497


What are user defined exceptions?

585






How do you compare two objects?

518


What is the use of default method in interface in java? Explain

541


What is singleton class in ruby?

555


What is the difference between class & structure?

561


How do you download stubs from Remote place?

1352


Give us a program to check for parenthesis matching using stack.

550


What do you know about java?

515


What is the difference between size and length in java?

506


Why are data types important?

531


What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?

1931