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



Home Answers Viewqa Java-Beginners main function defnition in class
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


naren
main function defnition in class
2 Answer(s)      6 years ago
Posted in : Java Beginners



Advertisement
View Answers

December 30, 2008 at 10:42 PM


Hi friend,

The main method is similar to the main function in C and C++; it's the entry point for your application and will subsequently invoke all the other methods required by your program.

The main method accepts a single argument: an array of elements of type String.

public static void main(String[] args)


Thanks


January 2, 2009 at 12:12 PM


hi,

we use public because we can use that method(main) not only in the current directory.

That is please refer "Pakages" concept.

.............
chandrakanth.k


Related Tutorials/Questions & Answers:
main function defnition in class - Java Beginners
main function defnition in class  why do we use public infront of a main function   Hi friend, The main method is similar to the main function in C and C++; it's the entry point for your application
main function
main function  Give me the description of public static void main(Strings args
Advertisements
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
main function in java - Java Interview Questions
main function in java  1....why is function main() define as static in java? 2...drawbacks of using rmi
Understanding public static void main function
Understanding public static void main function       The public static void main function is important function in Java programming language. In this section we will learn about main
Main function parameter in C language - Ajax
Main function parameter in C language  Please let me know how this Main(int argc,char*argv[]) works and detailed example on their roles in command...; Hi Friend, int main(int argc, char **argv) The main function serves
could not find the main class programm will exit - error
could not find the main class programm will exit - error  when i... main class programm will exit. class Car { String name: String Color...); System.out.println("Number of the Car is: " + num); } public static void main
How I call the function union from the main - Java Interview Questions
How I call the function union from the main  Please, from public static void main(String[] args) I would like to call the function union and I... declared in main function //------------------------------- package model
Can I have multiple main() methods in the same class?
Can I have multiple main() methods in the same class?  Hi, Can I have multiple main() methods in the same class?   Hi, No, We cann't use multiple main() method within the same class. If we do this then the program
How to eliminate error," Could not find the main class: filecopy.FileCopy. Program will exit." ?
How to eliminate error," Could not find the main class: filecopy.FileCopy....) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: filecopy.FileCopy. Program will exit. Exception in thread "main" Java
Class and interface in same file and accessing the class from a main class in different package
Class and interface in same file and accessing the class from a main class... a class named CantFly in same file. A main method CheckAnimal.java. Below... class CheckAnimals { public static void main(String[] args) { Animal
Class and interface in same file and accessing the class from a main class in different package
Class and interface in same file and accessing the class from a main class... a class named CantFly in same file. A main method CheckAnimal.java. Below... class CheckAnimals { public static void main(String[] args) { Animal
how to call java script function through java class file
how to call java script function through java class file  how to call jframe in java script
how to pass variable from simple java main class(not servlet) to the jsp page?
how to pass variable from simple java main class(not servlet) to the jsp page?  I have a simple Java class in which I invoke a call to a JSP page... from the simple Java class to the JSP page. How can I do that? Here is my
.jar file keeps giving me " could not find the main class". Program will exit.
.jar file keeps giving me " could not find the main class". Program will exit... netbeans's project properties clearly sets testing2.hihi as my Main class and I have... click on it, it gives me the message" could not find the main class. Program
What is Public static void main
in java using main method. class Helloworld { public static void main(String...What is Public static void main In most of the Programming language, main function is the first function where program start execution. This is the first
function
function  difference between function overloading and operator overloading
main method
can not make multiple main with in the same class program fails to compile. Compiler gives error that the main method is already defined in the class...main method  hello, Can I make multiple main methods in the same
MAin error
but @ d tym of runnin error in main class is generated Exception in thread "main".java.lang.NoClassFoundDefLoader. : Hello caused...MAin error  Error while running hello program in another dir rather
Interface Vs Abstract Class
Interface Vs Abstract Class       There are three main differences between an interface and an abstract class: At the same time multiple interfaces can be implemented, but only
main method
is a class method. void- It indicates that the main() method has no return value...main method  psvm(String args[]) what does this arguement in paranthesis denote?   Hi Friend, public-It indicates that the main() method
main method
main method  Why is the java main method static
main method
main method  What is the argument type of a program's main() method
main() method
main() method  Can we define two main() methods having same parameter but with different return type in a program
About Main
About Main  can u create the object of one interface ? But i can able to create the abstract class through anonimous inner class.similarly can i
About Main
About Main  can u create the object of one interface ? But i can able to create the abstract class through anonimous inner class.similarly can i
main func - Java Beginners
main func  why do we pass array of strings in main function of java?  Hi Friend, It is used to signify that the user may opt to enter parameters to the java program at command line. Thanks
public static void main
public static void main  what is mean public static void main?   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
Can a main method be overloaded?
Can a main method be overloaded?   Hi, Can a main method be overloaded? thanks,   Hi, Yes, In Java program we could having multiple number of main() methods with different Signature and implementation in the class
main() syntax - Java Beginners
] [import statements] [class declaration] [main() method] For Example: package roseindia; import java.lang; class Hello{ public static void main(String...main() syntax  Hi, I would like to know the complete structure
Main method overloading
Main method overloading  Can we overload main()method
 

 

 

DMCA.com