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



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sudhakar
im new to java
1 Answer(s)      4 years and 8 months ago
Posted in : Java Beginners


what is the significance of public static void main(string args[])statement

Advertisement
View Answers

April 19, 2010 at 12:24 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:
im new to java - Java Beginners
im new to java  what is the significance of public static void main... for a java class to execute it as a command line application. public- It provide...- It specifies the return type. main- This method in java is designed
to all Experts.. please help me. im using a Jcreator. - Java Beginners
to all Experts.. please help me. im using a Jcreator.  3. Write a program that asks the user to enter a word. The program will then repeat word..."); Scanner input=new Scanner(System.in); String word=input.next(); int len
Advertisements
AJAX IM
AJAX IM       ajax im ("asynchronous javascript and xml instant messenger"... is updated in real-time via JavaScript.   Ajax IM (Ajax Instant Messenger
Im not getting validations - Struts
to trace the problem.... BeCoz..Im new to Struts... Thanks InAdvance...Im not getting validations  I created one struts aplication im using... in s-c.xml But Im unable to get validations This is my validation.xml file
New to Java - New to java tutorial
Technical description of Java Mail API       This section introduces you with the core concepts of Java Mail API. You must understand the Java Mail API before actually delving
new java technologies 2012
new java technologies 2012  new java technologies 2012
New To JAVA - Java Beginners
New To JAVA  hi iam new to java..,can you please guide me how to learn the java and also tell me how many days it takes to learn java  Hi... will get more information about java. Read more detail. http
add new package java
add new package java  How to add new package in Java
new java technologies 2011
new java technologies 2011  what are the new java technologies in 2011
opening new browser with new JSESSIONID using java
opening new browser with new JSESSIONID using java  I am facing following problem, I am trying to open a new browser using java. First i have opened one IE browser and manually. And i ran my LaunchURL.java file, it is opening new
NEW IN JAVA - Java Beginners
NEW IN JAVA  Suppose you are asked to design a software tool... static void main(String[] args) throws Exception { Scanner scan = new Scanner(System.in); Random random1 = new Random(); Random random2 = new Random(); int
New to Java Please help
New to Java Please help  Hi I need help, can some one help me.... Thanks!   If you are new in java, then you need to learn core java concepts.So go through the following link: Core Java Tutorials Here, you will find
Very new to Java
Very new to Java   hi I am pretty new to java and am wanting to create a programe for the rhyme 10 green bottles. 10 green bottles standing on the wall 10 green bottles standing on the wall and if 1 green bottle should
New to Java?
New to Java?       If you are new to Java technology and you want to learn Java and make career in the Java technology then this page is for you. Here we have explained how to learn
The new keyword in java
The new keyword in java In this section you will learn about new keyword in java. The new keyword is used to create a instance of a class. The new keyword...; A ob1 = new A(12,56); Shape ob2 = new Shape(ob,32,98); First line creates
new String(text) - Java Beginners
(text): In this Case Java will create a new String object in normal (non-pool...new String(text)  Please, what is the difference between this.text = text; and this.text = new String(text); in the example: public
Java create new array of strings.
Java create new array of strings.  Java create new array of strings.   Example: public class StringArray { public static void main... (eg. int,char,float etc). For example String name[]=new String[7
new
new    hi i am jane pls explain the difference between string greeting = good morning string greeting = new string ("good morning
new
new  hi the difference between string sname = good morning string sname =new("good morning
new
new    hi i am jane pls explain the difference between heap memory and stack memory
opening new window - Java Beginners
opening new window  Hi All, I have two classes with me , lets say A and B.when I press a button in class A , the class B should open in a new window.i.e., I want to know, how a new window(B) can be opened by clicking a button
Java new arraylist
Java ArrayList object is created with the reference of List interface Object is also created directly by the ArrayList class Java New Arraylist..."}; //ArrayList list=new ArrayList(); List list=new ArrayList(); list.add(ar[0
Im getting this error while running JPA project
Im getting this error while running JPA project  Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: examplePersistenceUnit] Unable to configure EntityManagerFactory
new
new   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html
New Features of JAVA SE 6.
New Features of JAVA SE 6.   .... Changes in I/O This is a new feature added in Java SE 6, which has... in JAVA SE 6 and JPDA has been added. Some new Methods are included like boolean
How to create new arraylist using Java
someone provides online example how to create new arraylist in java programming. thnaks,   Hi, In java programming language you can create new...How to create new arraylist using Java  hi, I want to develop
Create new file in java
Create new file in java We are going to discuss how to create new file in java... in java File class representing the files and folder pathnames by location. With File class we create files and directories. Java File represents actual
Java file new directory
Java file new directory In this section, you will learn how to create a new directory. Description of code: This is a common task. The java.io.package... { public static void main(String args[]) { File file = new File("Hello
Java file new line
Java file new line In this section, you will learn how to write the text in new line of text file. Description of code: The package java.io.* has provide... main(String[] args) throws Exception { File f = new File("C:/file.txt
How to allocate a new long buffer in java.
How to allocate a new long buffer in java.  In this tutorial, we will see how to allocate a new long buffer. LongBuffer API: The java.nio.LongBuffer...;} } Output C:\>java AllocatLongBuf Capacity
How to allocate a new int buffer in java.
How to allocate a new int buffer in java.  In this tutorial, we will see how to allocate a new int buffer. IntBuffer API: The java.nio.IntBuffer...;} } Output C:\>java AllocateIntBuffer Position of IntBuffer :0
 

 

 

DMCA.com