• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help!

 
Albert Wong
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am preparing the SCWCD exam, when I download Miftah's notes from javaranch. I find that in the
servlet thread-safe section he mention the "instance variables" , I just get confused.
what is "instance variables" ?
Could you guys get me some example?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instance variables are the variables that are declared in a class, usually at the top, there are created for each Instance of the class that is created.
example
public class myClass{
int myClassInt;
String aString;
myClass(){
}
public void aMethod(){
}
}

myClassInt and aString are instance variables.
Mark
p.s. While your handle Sunny2000 is a cool handle. Javaranch has a policy for all users to be registered with their full first and last names. Please change your name.
[ April 02, 2002: Message edited by: Mark Spritzler ]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No offense Sunny, but "instance variables" is a term that you must know if you have already finished your SCJP, which BTW is a requirement for SCWCD.
Doesn't this thread belong to Java In General (Beginners).... :roll:
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic