doubt about main function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pavanpvss
    New Member
    • Apr 2008
    • 9

    doubt about main function

    hi,
    can anybody tell me the meaning of public static void main(Strin args[])?
    can you please explain the meaning of each term?
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    I bet you didn't care to at least read a tutorial on the basics of Java.

    kind regards,

    Jos (moderator)

    Comment

    • pavanpvss
      New Member
      • Apr 2008
      • 9

      #3
      Originally posted by JosAH
      I bet you didn't care to at least read a tutorial on the basics of Java.

      kind regards,

      Jos (moderator)
      Dear friend,
      Actually public in psvm(String args[]) means that the main function in the program is accesible to every other function, outside the file in which main is written, void means the one that does not return anything,main is the function name thru which java program starts executing and String is the class name. I know little about static. In java the method or variables whose names start with static, are stored in Ram while non static contents are stored in the Object. I would like to know abt args here and also more abt static keyword. please explain me.

      Comment

      • Laharl
        Recognized Expert Contributor
        • Sep 2007
        • 849

        #4
        args is any command line arguments to the program, as for static, I recommend a Google search for something like 'java static keyword'.

        Comment

        • sukatoa
          Contributor
          • Nov 2007
          • 539

          #5
          I know little about static. In java the method or variables whose names start with static, are stored in Ram while non static contents are stored in the Object.
          Can you post the article that supports your knowledge?

          I like to read it... for me it is interesting.... . :)

          Maybe this is a big impact for me when designing a serious applications soon....

          Object? maybe in processor's registers.....

          regards,
          sukatoa

          Comment

          Working...