// File: StaticExample4 // // Author: Rahul Simha // Created: August 19, 1998 // Modified: Sept 2007 // // Illustrates inheritance in static objects public class StaticExample4 extends StaticExample { // A new function static void printxNicely () { System.out.println ("The value of x is " + x); } public static void main (String[] argv) { x = 5.34; // The variable x is inherited. printx (); // This method is inherited. printxNicely (); // This is new. } }