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



Home Answers Viewqa Java-Beginners public static void main
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


pranav mishra
public static void main
2 Answer(s)      2 years and 5 months ago
Posted in : Java Beginners


what is mean public static void main?


Advertisement
View Answers

April 30, 2012 at 12:46 PM


public-It indicates that the main() method can be called by any object.

static-It indicates that the main() method is a class method.

void- It indicates that the main() method has no return value.

main-It is required because compiler understands this method as starting method.

(String args[])-It is used for receiving any arbitrary number of arguments and save it in the array.

For more information, visit the following link:

Understanding public static void main



May 24, 2012 at 11:49 PM


public static void main(String args[]) {
public => means you can call this method from any where
static=> keyword in java means you don't need object for this you can directly call it.
void => means this method is not returning any thing.
suppose method returns string data then you can use string instead of void.

String args[]=>>may takes arguments from command line.



Related Tutorials/Questions & Answers:
public static void main
public static void main  what is mean public static void main?  ... information, visit the following link: Understanding public static void main.... static-It indicates that the main() method is a class method. void- It indicates
Static keyword in public static void main
= a * 4; } public static void main(String args[]) { meth(42); } } In the above...Static keyword in public static void main  Hi, I have seen... { static int a = 3; static int b; static void meth(int x) { System.out.println("x
Advertisements
Understanding public static void main function
Understanding public static void main function       The public static void main function is important.... Read more about public static void main function at http://www.roseindia.net
Why we are writting public static void main(String args[])?
Why we are writting public static void main(String args[])?  Why we are writting public static void main(String args[])? please elaborate it... and also explain the statement System.out.println("abc
JAVA what is different between static block and public static void main(String a[]) method
JAVA what is different between static block and public static void main(String... void main(String a[]) method,we execute method without main method(by static block) why need of public static void main(String [])?   Static blocks
What is Public static void main
What is Public static void main In most of the Programming language, main... are the variation of main method. public static void main(String[] args) public static void main(String... args) public static void main(String args
What happen when we write static public void instead of public static void?
What happen when we write static public void instead of public static void?  Hi, What happen when we write static public void instead of public.../gettingstartedwithjava/public-static-void-main.shtml   Hi
Why is the main method declared static?
Why is the main method declared static?  Hi, Why is the main method declared static? thanks   Hi, When we declare main() method in any Java class always has the same signature, and we declare public static void main
Can we replace main() with static block or with other static methods?
Can we replace main() with static block or with other static methods?  what is the use of public static void main()?can't we achieve the same thing through static block or through other static methods
Accessing non-static members through the main method in Java.
it is permanently public static void... Accessing non-static members through the main method in Java.  As an oop rule, a static method can have access only to static variables and static
I'm getting an illgal start of expression error in my code for the public static boolean portion at the bottom... any ideas?
{ public static void main (String[] args) { Random rand = new Random... { public static void main (String[] args) { Random rand = new Random...; } } } } public static boolean playAgain
STATIC
is an example: public class StaticTest { static{ System.out.println("Hello from static block"); } public static void helloMethod() { System.out.println("Hello from static method"); } public static void main(String[] args) { helloMethod
static
StaticClass1 { public static void main(String[] args){ StaticClass1 sv1...redeclare static variable in the inherited class  can we redeclare static variable in the inherited class like this: public class StaticClass1
static
is why if you declare the function main as static then java does not have...Static Concept  in what are all the situation we may use static...,then use static blocks and without creation of object we need to perform some task
static
static  what r the main uses of static in java   Hi Friend, The Static means that a certain object/variable is resident in memory and accessed each time an instance of a class, an object, is created. When static
static
static  What is the exact need of declaring a variable as static?   A static variable is a variable who's single copy in memory is shared by all objects,so any modifications to the static variable will modify it's value
Static
Static  Can i know the real time example for Static method and final variables with defenition? Thank you
main function
main function  Give me the description of public static void main(Strings args
The void keyword
is the syntax that displays how to use the keyword voidpublic class Myclass { public void doit() { <... The void keyword      
static functions
(){ System.out.println("it is static methode"+a); } } class main{ public static void...{ public static void main(string args[]){ a obj=new a();//can ,t requirement..."+a); } } class main{ public static void main(string args[]){ a obj=new a();//can ,t
void Java Keyword
: public class Cla { public void doit(); { <... void Java Keyword       The void is a keyword defined in the java programming language. Keywords
main method
in paranthesis denote?   Hi Friend, public-It indicates that the main() method can be called by any object. static-It indicates that the main() method is a class method. void- It indicates that the main() method has no return value
Void class in Java - Java Beginners
Void class in Java  Hi, What is the purpose of Void class? Thanks   Hi Friend, It is an uninstantiable class that hold a reference to the Class object representing the primitive Java type void. Thanks
static & instance - Java Beginners
is: " + count); // } public static void main(String[] args... and when can use instance variable.    public class Main { private static int noOfObjects; private int count; public Main
main method
main method  Why is the java main method static
Main function.. - Java Beginners
Main function..  Hi Friend.. public static void main(String args[]) What does it mean...public - static - void - main -(String args[]) Can u plz...   Hi friend, public: The method can be accessed outside the class
class static - Java Beginners
"); } public static void main(String[] args) { //i=100; j...; public static void staticMethod(){ System.out.println("you can access a static method this way"); } public void nonStaticMethod(){ i=100
public String getResult
public String getResult  String temp=""; for (int i=0,j=1; i<j; i++,j++){ if ((x[i].indexOf((d))!=-1){ temp+=x[i]; temp+=":"; } { return temp; } what is the output when d= "life" and x={"life
PHP Variables Static
PHP Variables Static PHP static variable is used to remember the value... is running a static variable is only retained by the function , but it is NOT shared with the main code. The crucial fact is that PHP function does not have
problem with main - Java Beginners
; public static final int MOUTH_DEGREES_SHOWN = 180; public void paint...*; public class YellowFace extends JApplet { public static final int FACE_DIAMETER = 200; public static final int X_FACE = 100; public static final
main() syntax - Java Beginners
roseindia; import java.lang; class Hello{ public static void main(String...main() syntax  Hi, I would like to know the complete structure of the main() in jdk1.5 with sample program. Regards, UsmanAli Shaik,  
Advertisements
 

 

 

DMCA.com