variables?



Hello all, I need some reinforcement with variables.
Are instance variables the same as fields( which are found outside a method,
but within a class). And local variables are found within methods. Is that
correct terminology?; the reason I ask is because a couple different books,
and sites refer to these variables by different names. My understanding is
instance variables become the state of a object, whereas local variables
work with the methods. Can anyone verify this. Thanks again


.



Relevant Pages

  • Re: Object reference
    ... public void manage{ ... On your list of things to study and try, put instance variables (also known ... // Declare local variables here. ... // Do some things with local variables. ...
    (comp.lang.java.programmer)
  • Re: ruby1.9 block scope
    ... dynamically generated _unique_ classes bound to the current context ... different scopes containing instance variables to that current context. ... for local variables that have been assigned to before the code blocks. ...
    (comp.lang.ruby)
  • Re: cannot get attr_accessor to work
    ... On Wed, 21 Jan 2009, Tom Cloyd wrote: ... nut. ... Ruby is interpreting log and logging_now as local variables. ... post make it clear that I'm dealing with instance variables? ...
    (comp.lang.ruby)
  • Re: Identifying fields of a class
    ... make them instance variables" applies only to Components perhaps? ... Obviously local variables ... The reason is mainly for documentation. ... Tom Hawtin ...
    (comp.lang.java.programmer)
  • Re: Identifying fields of a class
    ... >make them instance variables" applies only to Components perhaps? ... Obviously local variables ... http://mindprod.com Again taking new Java programming contracts. ... Prev by Date: ...
    (comp.lang.java.programmer)