If you mean an "instance variable" (a.k.a. "field") of another class, then you can access it if its access modifier allows it. If it is "private", you can't access it(*). If it is package-private or "protected", you may be able to. If it is "public", you can.
If you mean a local variable declared within a method of another class, then you can never(*) access that variable from another class.
Which did you mean?
Note that direct access to the non-final fields of another class is bad style. Fields should usually be declared "private" and should be accessed from outside by "getter" and/or "setter" methods. This reduces coupling between classes.
Instance fields that are "final" are sometimes OK to access directly from another class, though it's usually still better style to use "getters".
Fields that are "static final" are constants, and OK to access directly from another class, where that other class needs that constant.
(*) Some exceptions, involving inner and nested classes, which we'll gloss over in this Beginner forum.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.