Question: what are instance variables and local variables in java?
Answer: There are three kinds of Java variables: Local variables are declared in a method, constructor, or block. ... Local variables are not visible outside the method. Instance variables are declared in a class, but outside a method. They are also called member or field variables.