• Post Reply Bookmark Topic Watch Topic
  • New Topic

static members  RSS feed

 
sano vasu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Friends,

can't a static method access non static members if so please give the reason

Thanks in advance
 
Raghuram Srinivas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NO! tats cos u can access a non static methods even before u create an instance of the class and thus it would be meaning less to allow access of non static variables/methods from a static method.

~Raghuram
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!