UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Why do we use â??public static void mainâ?? only in Java?

Asked by Last Modified  

Follow 5
Answer

Please enter your answer

This is neccesary because main() is called by the JVM before any objects are made. Since it is static it can be directly invoked the class. Similarly, we use staticsometime for user defined methods so that we need not to make objects. voidindicates that the main() method being declared does not return...
read more

This is neccesary because main() is called by the JVM before any objects are made. Since it is static it can be directly invoked the class. Similarly, we use staticsometime for user defined methods so that we need not to make objects. voidindicates that the main() method being declared does not return a value.

read less
Comments

IT Professional Trainer with 10+ years of experience in IT industry

public static void main() main() is the starting point of any java program and your code write inside it. Without it you can not execute console progem in java
Comments

Algomitra Java Tutor

Every computer program needs a starting point of execution and the static main function is the starting point of execution in Java language. Now it was a choice of the language designers of Java to make it that way. But there is a reason to make it static because if it is not static then JVM has to create...
read more

Every computer program needs a starting point of execution and the static main function is the starting point of execution in Java language. Now it was a choice of the language designers of Java to make it that way. But there is a reason to make it static because if it is not static then JVM has to create an instance of the class where the main method is then it has to call the main method, which is an extra overhead in terms of performance.

read less
Comments

Technical Trainer IT With Overall Experience of 10+ Years

Whenever we use static keyword before any function it means that the function can be invoked when required without using object. And main() is the function that starts the execution of program. So the function to be invoked by JVM it has to be public. It has to be static so that it can be invoked without...
read more

Whenever we use static keyword before any function it means that the function can be invoked when required without using object. And main() is the function that starts the execution  of program. So the function to be invoked by JVM it has to be public. It has to be static so that it can be invoked without creating any object. We can use any other return type like int instead of void if we want main() to return any value. 

read less
Comments

View 2 more Answers

Related Questions

Hi sir, I'm confused between .net and java. What to choose for a career. I have little bit knowledge of asp.net. Please guide me for this. Thank you
Hello Kirit, The application which were devloped about 2 decades back was mostly coded in java and so you will see so many of the application (in several company and outside) written in java. .Net(collectively...
Kirit
My name is Rajesh , working as a Recruiter from past 6 years and thought to change my career into software (development / admin/ testing ) am seeking for some suggestion which technology I need to learn ? Any job after training ? Or where I can get job within 3 months after finishing my training programme- your advices are highly appreciated
Mr rajesh if you want to enter in to software Choose SAP BW AND SAP HANA because BW and HANA rules the all other erp tools next 50 years.it provides rubust reporting tools for quicker decesion of business It very easy to learn
Rajesh
1 0
6
Is it possible to learn java at home without coaching in one month?
It all depends on you. If you are already aware of programming then it is definetly possible to learn java at home. But if learn through a tutor then you can learn easily.
Pritom
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Introduction to Course Content
Video about what we are going to learn throughout the Java Training Session .

JAVA Online Training
What is Java? Java is a technology developed by James Gosling at Sun Microsystems, Sun Microsystems is now a part of Oracle Corporation. This is one of the most powerful & securable language used to...

History Of Java
Java history is interesting to know. The history of java starts from Green Team. Java team members (also known as Green Team), initiated a revolutionary task to develop a language for digital devices such...
V

CoreJAVA
Core Java Training High Level Course Content Trained by Java Architect 1. Core Java Programming Introduction of Java 2. Data types and Operators 3. Control Flow statements 4. OOPS and its application...
A

Observer Pattern in Java.
As I was going through the different source code files of the Java Util package, I found the implementation of the Observer Pattern ( see the Gang of Four books for more information on this pattern) in...

Recommended Articles

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more