Re: what is difference between Class variables and Instance variables?



On Sun, 14 Aug 2005 03:13:19 -0700, rahul8143 wrote:

> hello,
> what is difference between Class variables and Instance variables?

A class variable is visible/usable to all methods within that class. A
instance variable is only visible/usable within the method (instance) that
it has been declared in. Its all about variable scope my friend!

regards,

fartymcfly
.



Relevant Pages

  • Re: Delegating class methods
    ... Every object has instance variables. ... are talking about alternatives to class variables. ... The main confusion with Ruby class variables comes from: ... It would be nice if there was a common term for 'instance variables ...
    (comp.lang.ruby)
  • Re: what is difference between Class variables and Instance variables?
    ... > what is difference between Class variables and Instance variables? ... Instance variables belong to the object instance. ...
    (comp.lang.java.programmer)
  • Re: Class instance variable idiom
    ... I would also recommend to not use them. ... "class instance variables", but I've yet to experience any problems ... with class variables. ... In Ruby> 1.8, class variables are going to be somewhat more strictly ...
    (comp.lang.ruby)
  • Re: what is difference between Class variables and Instance variables?
    ... > what is difference between Class variables and Instance variables? ... you could be asking such beginner questions in comp.lang.java.help. ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: Class member method
    ... I just wanted to have access to class variables in DirectPlayMessageHandler ... > HRESULT WINAPI DirectPlayMessageHandler(PVOID pvUserContext, ... > Regards. ...
    (comp.lang.cpp)