Does the order of public and static declaration matter in main method?



Does the order of public and static declaration matter in main method?..

Answer / Pankaj Jaiswal

The order of 'public' and 'static' does not matter in the main method declaration. Both can appear before or after the method name as long as they are present at the beginning of the line.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What do you mean by thread safe?

1 Answers  


What does compareto () do in java?

1 Answers  


What are the important features of Java 11 release?

1 Answers  


What is meant by Static query and Dynamic query?

2 Answers  


What are different access specifiers in java? Explain

1 Answers  


If there is no implementation of MARKER INTERFACE in java. Then how compiler come to know about specification.

2 Answers  


What are the operands of instanceof operator?

3 Answers  


Can you change array size in java?

1 Answers  


What are null interfaces? Give some examples?

2 Answers  


What is the difference between method and constructor ?

3 Answers  


What class allows you to read objects directly from a stream?

1 Answers  


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

1 Answers   Genpact,


Categories