I have a base class called Geometry from which there exists a subclass Sphere:
public class Geometry { String shape_name; String materia
You have to cast (specifically, downcast):
((Sphere) g).radius