From: Michael Campbell Date: 2003-08-22T04:23:12+09:00 Subject: Re: Class variables - a surprising result > > As far as I know, C++ and Java do not have class variables. They have > > static member variables, > > .. . . which are not inherited, which is why it is surprising to many > that Ruby's @@variables are inherited. What do you mean by "not inherited"... I'm sure you're correct, but I'm confused: C:\tmp>cat Sub.java class Base { static int B = 1; } public class Sub extends Base { public static void main(String[] args) { System.out.println("Sub.B = " + Sub.B); } } C:\tmp>javac Sub.java C:\tmp>java Sub Sub.B = 1