In Java coding we will write a public static void main()? Why
won't we write as a static public void main()



In Java coding we will write a public static void main()? Why won't we write as a static publ..

Answer / Rahul Gautam

We won't write it as a static public void main() in Java because the 'main' method must be defined within a class and must have a public access modifier, but it should not be declared with the static keyword. The static keyword is used to call methods that do not require an instance of the class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

What does ecma stand for?

1 Answers  


How to create an object in javascript?

1 Answers  


I need project details about WEB CONTENT FILTERING USING NEURAL NETWORKS and how to explain it....plz help me in this topic.....

1 Answers  


What is the default data type in javascript?

1 Answers  


How many hours learn javascript?

1 Answers  


Write a javascript program to make a simple calculator

11 Answers   Anand Group, TCS,


how can we retrieve value from one database server and store them another database server using sql server code

1 Answers   HP,


What are the advantages of using JavaScript?

1 Answers  


Is it possible to use javascript to change the meta-tags of the page?

1 Answers  


How to convert numbers to strings using javascript?

1 Answers  


What does isNaN function do?

2 Answers   Satyam,


What and where are the best javascript resources on the web?

1 Answers  


Categories