This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This is a link to an article listing the comparison of Java to C++ http://java.sun.com/docs/white/langenv/Simple.doc1.html An instance variable is a variable that exists in each occurance or instance (object) of the class that is created. This is how you keep track of the attributes of each instance separately from the other instances. When you say class variable I believe that you are referencing static variables. When the class is first loaded (before any instances are created) the static variable(s) is created. A static variable only exists once for all instances of the class. An example is the static variable pi in the math class. There is only 1 pi, and all the instances use it. In addition there are local variables. These exist only inside methods and when the method invocation is over they cease to exist.
"JavaRanch, where the deer and the Certified play" - David O'Meara