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?
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 ]
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