answersLogoWhite

0


Best Answer

No. Java classes in web applications do not have Main Methods.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is the any class containing main function in a webapplicatin?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can we write a code after main closed in c language?

Register the function(s) containing the code with atexit.


Is main a predefined function in java?

No. It is a user defined function which the person who is creating the java class has to code by himself.


The name of a java programm file must match the name of the class with the extensionjava its true or false?

yes it is true becoz the class contain the main function or you can say that it is necessory to define the main function into the class name ex------> class test { int a=10; int b=20; void sum() { int c=a+b; System.out.println(c); } } class test12 { public static void main(String s[]) { test t=new test(); t.sum(); } } in the above example class test12 contain the main function so the file name is as well as test12.java.


Why every program runs with its main class name in Java?

The "main" function name is reserved and specifies the entry point of the application.


What is the main function of an official high school transcript?

To chart standardized test scores and class grades


What is the main function of an official transcript in high school?

To chart standardized test scores and class grades


Why the main function is public and static?

The main function is public because it means it needs to be called by any object. I had to check this myself but if you try to make the main function in Java private it will give you a run time error. It is static because it is indicating it is a class method and it does not need to be instantiated. Without the static keyword you would need to do something like this Main main = new Main();


How do you access global variable from within the main function when the local variable is of the same name?

When you acess a global variable inside main function you must use the same name, because the variable declared as global can be accessed by any function/procedure on the class where it was defined.


What is a main function in java?

the main function or main method is the first method that gets invoked when you try to run a java application. Any class that has a main method can be executed in a standalone fashion. A typical main method would look like below: public static void main(String[] args) { … // code goes here }


Why main function written as public static in java?

They are public because they must be accessible to the JVM to begin execution of the program. Main is the first method that would get executed in any class.They are static because they must be available for execution without an object instance. you may know that you need an object instance to invoke any method. So you cannot begin execution of a class without its object if the main method was not static.OrMain is starting point of the program execution Main method is called by JVM there is no need for JVM tocreate an object of the class just to access Main function


In java how the class containing main is executed with out creating an object?

You may know that static methods in Java are executed even before the constructor of that class are called. Similarly, since the main method is static it gets executed first even before the others methods of the class are called. Since it is being called before the constructor, logically speaking you cannot have objects of that class.


What is the function of main engine?

Main propulsion is the function of the marine main engine.