InterviewSolution
Saved Bookmarks
| 1. |
In A Java Program, We Usually Follow The Main Method Declaration As Public Static Void Main (). What Will Happen If I Alter The Order Of Public And Static Declaration For The Main () Method In A Java Program? |
|
Answer» Changing the order of the KEYWORDS ‘public’ and ‘STATIC’ in the main () method declaration of a JAVA program does not matter but one must always ENSURE that the return type of the main () method i.e. void should always APPEAR before main (). Changing the order of the keywords ‘public’ and ‘static’ in the main () method declaration of a Java program does not matter but one must always ensure that the return type of the main () method i.e. void should always appear before main (). |
|