a small doubt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • charitra
    New Member
    • Mar 2007
    • 1

    a small doubt

    main() inspite of being static can call other non static functions.How come?
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by charitra
    main() inspite of being static can call other non static functions.How come?
    No it can not. In order to call any non-static method you first need an object
    to invoke it on. The main() method is no exception to this rule.

    kind regards,

    Jos

    Comment

    Working...