Home TechnologyProgrammingJava Subscribe to RSS

Why We Use Public Static Void Main In Java?

Answer Question

2 Answers - Sort by: Date | Rating

    Public in java tells us of which method the function is and its access outside the class(remember the different methods like public, private,protected), static is used so that the class instance can access the method, void signifies there is no return type, main is the method.
    0 0

    Vikrams 

    answered 6 months ago

      Java interpreter starts the execution from main , it contains the 3 modifier (public,private,final).public indicates that main() method can be called by any object.static indicates that main() method is class method.void indicates that the main() method has no return value.
      0 0

      Nssankar87 

      answered 6 months ago

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store

          Blurtit International