answersLogoWhite

0


Best Answer

The main method is simply an entry point to your executable code. When you run a Java program, it looks for a main method as the first section of code to execute, which is why all of your programs start there.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

The main method of a java class is the starting point of the program execution. The code begins to execute only from the main method. Any java application would have to have a main method that performs all initializations and kick starts the process.

Ex:

public class Test {

public static void main(String[] args){

...

}

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the task of main method in a java program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Why using the name main for main method in java?

If you run an java file(as an .class or .jar file) there's always 1 method being called: The main(String[] args) method.The method is only called once.Example of an main method:public static void main(String args[]) throws IOException {LoggingBootstrap.bootstrap();gui = new GUI();}In this case it only bootstraps the logger and uses the constuctor method of GUI(the graphical user interface of the program)


How do you convert text to speech in java?

This is a daunting task, and for most practical situations, the best option is to get a library of classes, that has already solved the problem, and integrate it with your program.


What is meant by a thread in java programming language?

A thread and a process are same but a minor difference is there. Process executes a program completely without splitting whereas a thread splits a program into smaller tasks and then execute them separately.And then combine the final result. that is why a process is often called as Heavy weight and a thread is called as light weight.


What is subroutine?

Subroutine is an instruction sequence in a machine or assembly language program that can be prewritten and referred to as often as needed. Subroutine is used for controlling thing e.g. traffic lights burglar alarms they all use subroutine


Define briefly about procedures and macros in microprocessor?

Procedures-Procedure is the set of codes written in other module used 2 solve a specific task and can be included in the main program when an instruction CALL is used in the program. Macro is also the set of codes used in the 'main program' or same module used to solve a specific task. Macros can be called in the program with the syntax using syntax-MACRO_NAME(actual variables). But the macros should be included in the program with the syntax MACRO_NAME(dummy variables). Dummy and actual variables should match.

Related questions

What is the task of the main method in java platform?

It is the method that gets called when a Java application is started.


What is task of main method in Java?

All applications must start their execution from somewhere. In java that is the main method of a class.


Why using the name main for main method in java?

If you run an java file(as an .class or .jar file) there's always 1 method being called: The main(String[] args) method.The method is only called once.Example of an main method:public static void main(String args[]) throws IOException {LoggingBootstrap.bootstrap();gui = new GUI();}In this case it only bootstraps the logger and uses the constuctor method of GUI(the graphical user interface of the program)


task?

java socket


How do you do this java code?

You have to specify the task that you wish me to help you with the Java code.


How do you convert text to speech in java?

This is a daunting task, and for most practical situations, the best option is to get a library of classes, that has already solved the problem, and integrate it with your program.


Do you need java to play minecraft full?

Yes, you will need Java. I recommend installing the latest version of Java, JRE7, which I have provided a download link to it on Oracle's site just on the development of JRE7, it will highly increase Minecraft's performance. Also, Minecraft is coded in the Java language. It must be read with a Java program, and in your task manager, Minecraft is "javaw.exe" so a big yes!


What the steps that tell computer how to perform particular task?

A program is a set of detailed instructions that tells the computer how to perform a particular task.


Where can one learn about Ant Java?

Someone looking to learn about the Java Task, Ant, can find various websites describing it. One can find it on programming sites with tutorials on how to use this task.


What does it mean to say that Java is Robust?

Java is Robust it mean that java is object oriented programming in which bad program do not crash your computer. it restricts the programmers to correct and remove the errors from the program at the early stage.it is also called Robust because memory management checking is not handled by the programmer there is a mechanism scheduled memory that perform this task. Best Regards Rashid Ali Software Engineer. rashid_se@yahoo.com at facebook


What is Static method in programming?

A static method in java is also named a class method, because it does not need an instance (of his class) to be invoked. Static methods can't use instance variables (non static variables) or use the keywords 'this'. These methods receive all the information they need to complete his task from his parameters


What is the difference between networking and servlet in java?

Networking is a basic action. A servlet in Java is a single part of networking, a single task.