Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


parveen
java related
1 Answer(s)      4 years and 8 months ago
Posted in : Java Beginners


Why the "public static void main(Strings args[]){}??

why we use static key words here!!!?

Advertisement
View Answers

May 5, 2010 at 4:43 PM


Hi Friend,

This statement is necessary for a java class to execute it as a command line application.

public- It provide access to the JVM to call any method without being a member of that class.

static- It allow the JVM to call main method without creating object.

void- It specifies the return type.

main- This method in java is designed not to return anything to the JVM, hence the return type of the main function is void.

String args[]-Java take's each argument as string.

For more information, visit the following link:

http://www.roseindia.net/java/gettingstartedwithjava/public-static-void-main.shtml

Thanks


Related Tutorials/Questions & Answers:
related to java
related to java  what is mean of }); in java.i know that } is used to close a block of statement,) is used to close a statement and ";"is used after close a statement but i can not usderstood the use of }); together in a java
Java and jvm related question
Java and jvm related question  What is difference between java data types and jvm data types
Advertisements
Java Related Question
Java Related Question  hi, Why java doesn't has primitive type as an object,whats an eligibility to have a primitive type as an object by the languages
java related - Java Beginners
java related  Hello sir, I want to learn java. But I don't know where to start from. I have purchased one java related book. But I am..., shruthi  Hi friend, Java
java related question
java related question  How can we make a program in which we make mcqs question file and then make its corresponding answer sheet....like if we make 15 mcqs then java should generate it answer sheet of 15 mcqs with a,b,c d
java question related to objects
java question related to objects  what is the output of the following code? public class objComp { Public static void main(String args[]) { Int result = 0; objComp oc= new objComp(); object o = oc; if( o==oc) result =1; if(o
java related - Java Beginners
java related  Why the "public static void main(Strings args... is necessary for a java class to execute it as a command line application... object. void- It specifies the return type. main- This method in java
java related - Java Beginners
java related  is it possible for a biggener to learn a computer language like java to learn it online ?? actually i m a computer science student(fresher) and even in 12th class i have not taken c++ and no knowledge of it ....now
Java Related Question
Java synchronized method  Dear Friend, I have written below program for synchronized method in java but it's not working plz help me. program...","mangal","to","java"}; String name; SynchronizedModel(String nam) { name
Java Related Question
Java synchronized method  Hi, I have written below program for synchronized method in java but it is not working please help me. program...","to","java"}; String name; SynchronizedModel(String nam
coding related - Java Beginners
/java/java-conversion
java fundamental question related to string
java fundamental question related to string  public class Myclass { Public static void main(String args[]) { String s=‚??hello‚??; StringBuffer sb=new StringBuffer(s); Sb.reverse(); If(s==sb) system.out.println(‚??a‚
Frame related query - Java Beginners
Frame related query  hi..... i m having a query dat...can i open a frame inside another frame like dis.. m a new biginner of java n m finding it very intresting. my lines of codes are like dis:- import java.awt.*; import
Related to multiple inhetitance - Java Beginners
Related to multiple inhetitance  Sir, Plz help me to solve this question. Q.1. Write a Progarm to illustrate the concept of multiple inheritance using interface
Thread'd wait() related >>>>>>> - Java Beginners
Thread wait in Java  Hello, Seeking for a thread wait example in java. Also What is thread wait method and when we should call it in the application.Thanks
baaank acoounts related - Java Beginners
baaank acoounts related  hi all i have one code but that is not working kindly help me send me a working code as i a am totally new to java Assume that the bank maintains two kinds of accounts for its customers, one
How can i download these java related materials from rose india
How can i download these java related materials from rose india  How can i download these java related materials from rose india   Hello Friend, In every section of the website, there is download option. Just go
Related to Project
Related to Project  how speech to text project can be make in java? Please tell me the coding part therapeutically i know i have to use java speech api which offer two technology 1. speech recognization 2. speech syenthesis
StringBuffer related.
StringBuffer related.  how to make StringBuffer as immutable
related to database
related to database  how to override existing values in table? when user enters his updated data through query
Related to Histogram
Related to Histogram  hi this is srinivasrao. In my project i have to display using chart for that i want to use histogram. k chart displayed but the values given by me is not related display chart so please give the code if u
Related to XML
Related to XML  I have made a web application which send the SMS, i have provided the url in which i have to save the msg and the number's(to whom the message to be send).After fetching the message and numbers i was keeping
Related to XML
Related to XML  I have made a web application which send the SMS, i have provided the url in which i have to save the msg and the number's(to whom the message to be send).After fetching the message and numbers i was keeping
suggest some latest domains and its related project titles,abstracts - Java Beginners
suggest some latest domains and its related project titles,abstracts  what are the latest project titles? can u suggest some project titles in image processigng,mobile technnology which are purely related to computer science
Dumps related to weblogic certification
Dumps related to weblogic certification   I want to perform the weblogic certification exam code 1z0-110. Can anybody please provide me the dumps related to 1z0-110 Thanks in advance
related to multiple thread....!!!!
related to multiple thread....!!!!  Write a Java program, which creates a linklist for Employees info viz. EmpID, EmpName, EmpAge. All operations should be performed on the linklist, like; Create, Add, Delete, Update, Size
question related to overloading
question related to overloading  what is difference between function overloading & method overloading
question related to overloading
question related to overloading  what is difference between function overloading & method overloading
liferay related query
liferay related query  can you suggest me how to get all the session ids of different users logged in to liferay
Server Related exception
Server Related exception  How will write code to handle serverside exceptions in our projects.Earlier we dont know which exception the code will throw
Advertisements
 

 

 

DMCA.com